{"version":3,"file":"igniteui-angular-query-builder.mjs","names":[],"sources":["../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder-header.component.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder-header.component.html","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder.common.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder-drag.service.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder-tree.component.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder-tree.component.html","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder.directives.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder.component.html","../../../projects/igniteui-angular/query-builder/src/query-builder/public_api.ts","../../../projects/igniteui-angular/query-builder/src/query-builder/query-builder.module.ts"],"sourcesContent":["import { Component, DestroyRef, HostBinding, inject, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { IQueryBuilderResourceStrings, QueryBuilderResourceStringsEN } from 'igniteui-angular/core';\nimport { getCurrentResourceStrings, onResourceChangeHandle } from 'igniteui-angular/core';\n\n/* wcElementTag: igc-query-builder-header */\n/* blazorElement */\n/* jsonAPIManageItemInMarkup */\n/* jsonAPIManageCollectionInMarkup */\n/* blazorIndirectRender */\n/* singleInstanceIdentifier */\n/* contentParent: QueryBuilder */\n/**\n* @igxParent IgxQueryBuilderComponent\n*/\n@Component({\n    selector: 'igx-query-builder-header',\n    changeDetection: ChangeDetectionStrategy.Eager,\n    templateUrl: 'query-builder-header.component.html'\n})\nexport class IgxQueryBuilderHeaderComponent {\n\n    private _destroyRef = inject(DestroyRef);\n    private _resourceStrings: IQueryBuilderResourceStrings = null!;\n    private _customResourceStrings: IQueryBuilderResourceStrings = null!;\n    private _defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN);\n\n    /**\n     * @hidden @internal\n     */\n    @HostBinding('class') public get getClass() {\n        return 'igx-query-builder__header';\n    }\n\n    /**\n     * Sets the title of the query builder header.\n     *\n     * @example\n     * ```html\n     * <igx-query-builder-header title=\"Sample Query Builder\"></igx-query-builder-header>\n     * ```\n     */\n    @Input()\n    public title!: string;\n\n    /**\n     * Show/hide the legend.\n     *\n     * @example\n     * ```html\n     * <igx-query-builder-header [showLegend]=\"false\"></igx-query-builder-header>\n     * ```\n     * @deprecated in version 19.1.0.\n     */\n    @Input()\n    public showLegend = true;\n\n    /**\n     * Sets the resource strings.\n     * By default it uses EN resources.\n     *\n     * @deprecated in version 19.1.0.\n     */\n    @Input()\n    public set resourceStrings(value: IQueryBuilderResourceStrings) {\n        this._resourceStrings = value;\n        this._customResourceStrings = Object.assign({}, this._defaultResourceStrings, this._resourceStrings);\n    }\n\n    /**\n     * Returns the resource strings.\n     */\n    public get resourceStrings(): IQueryBuilderResourceStrings {\n        return this._resourceStrings ? this._customResourceStrings : this._defaultResourceStrings;\n    }\n\n    constructor() {\n        onResourceChangeHandle(this._destroyRef, () => {\n            this._defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN, false);\n            this._customResourceStrings = this._resourceStrings ? Object.assign({}, this._defaultResourceStrings, this._resourceStrings) : null!;\n        }, this);\n    }\n}\n","<div class=\"igx-query-builder__title\">{{ title }}</div>\n<ng-content></ng-content>\n","import { Pipe, PipeTransform, TemplateRef } from '@angular/core';\nimport { FieldType, FilteringLogic, IFilteringExpression } from 'igniteui-angular/core';\n\n@Pipe({\n    name: 'fieldFormatter',\n    standalone: true\n})\nexport class IgxFieldFormatterPipe implements PipeTransform {\n\n    public transform(value: any, formatter: (v: any, data: any, fieldData?: any) => any, rowData: any, fieldData?: any) {\n        return formatter(value, rowData, fieldData);\n    }\n}\n\n/**\n * @hidden @internal\n */\nexport class ExpressionItem {\n    public parent: ExpressionGroupItem;\n    public expanded!: boolean;\n    constructor(parent?: ExpressionGroupItem) {\n        this.parent = parent!;\n    }\n}\n\n/**\n * @hidden @internal\n */\nexport class ExpressionGroupItem extends ExpressionItem {\n    public operator: FilteringLogic;\n    public children: ExpressionItem[];\n    constructor(operator: FilteringLogic, parent?: ExpressionGroupItem) {\n        super(parent);\n        this.operator = operator;\n        this.children = [];\n    }\n}\n\n/**\n * @hidden @internal\n */\nexport class ExpressionOperandItem extends ExpressionItem {\n    public expression: IFilteringExpression;\n    public inEditMode!: boolean;\n    public inAddMode!: boolean;\n    public hovered!: boolean;\n    public focused!: boolean;\n    public fieldLabel!: string;\n    constructor(expression: IFilteringExpression, parent: ExpressionGroupItem) {\n        super(parent);\n        this.expression = expression;\n    }\n}\n\nconst IGX_QUERY_BUILDER = 'igx-query-builder';\nconst IGX_FILTER_TREE = 'igx-filter-tree';\n\n/**\n * @hidden @internal\n */\nexport const QueryBuilderSelectors = {\n    DRAG_INDICATOR: 'igx-drag-indicator',\n    CHIP_GHOST: 'igx-chip__ghost',\n\n    DROP_DOWN_LIST_SCROLL: 'igx-drop-down__list-scroll',\n    DROP_DOWN_ITEM_DISABLED: 'igx-drop-down__item--disabled',\n\n    FILTER_TREE: IGX_FILTER_TREE,\n    FILTER_TREE_EXPRESSION_CONTEXT_MENU: IGX_FILTER_TREE + '__expression-context-menu',\n    FILTER_TREE_EXPRESSION_ITEM: IGX_FILTER_TREE + '__expression-item',\n    FILTER_TREE_EXPRESSION_ITEM_DROP_GHOST: IGX_FILTER_TREE + '__expression-item-drop-ghost',\n    FILTER_TREE_EXPRESSION_ITEM_KEYBOARD_GHOST: IGX_FILTER_TREE + '__expression-item-keyboard-ghost',\n    FILTER_TREE_EXPRESSION_ITEM_GHOST: IGX_FILTER_TREE + '__expression-item-ghost',\n    FILTER_TREE_EXPRESSION_SECTION: IGX_FILTER_TREE + '__expression-section',\n\n    FILTER_TREE_LINE_AND: IGX_FILTER_TREE + '__line--and',\n    FILTER_TREE_LINE_OR: IGX_FILTER_TREE + '__line--or',\n    FILTER_TREE_SUBQUERY: IGX_FILTER_TREE + '__subquery',\n\n    QUERY_BUILDER: IGX_QUERY_BUILDER,\n    QUERY_BUILDER_BODY: IGX_QUERY_BUILDER + '__main',\n    QUERY_BUILDER_HEADER: IGX_QUERY_BUILDER + '__header',\n    QUERY_BUILDER_TREE: IGX_QUERY_BUILDER + '-tree',\n}\n\nexport interface IgxQueryBuilderSearchValueContext {\n    $implicit: any;\n    selectedField: FieldType;\n    selectedCondition: string;\n    /* blazorSuppress */\n    defaultSearchValueTemplate: TemplateRef<any>;\n}\n","import { filter, fromEvent, sampleTime, Subscription, tap } from 'rxjs';\nimport { IgxQueryBuilderTreeComponent } from './query-builder-tree.component';\nimport { ElementRef, Injectable } from '@angular/core';\nimport { ExpressionGroupItem, ExpressionItem, ExpressionOperandItem, QueryBuilderSelectors } from './query-builder.common';\nimport { IBaseChipEventArgs, IgxChipComponent } from 'igniteui-angular/chips';\nimport { IDragBaseEventArgs } from 'igniteui-angular/directives';\n\nconst DEFAULT_SET_Z_INDEX_DELAY = 10;\nconst Z_INDEX_TO_SET = 10010; //overlay z-index is 10005\n\n/** @hidden @internal */\n@Injectable()\nexport class IgxQueryBuilderDragService {\n\n    /** The ExpressionItem that's actually the drop ghost's content */\n    public dropGhostExpression!: ExpressionItem;\n    public isKeyboardDrag!: boolean;\n    private _queryBuilderTreeComponent!: IgxQueryBuilderTreeComponent;\n    private _queryBuilderTreeComponentElRef!: ElementRef;\n    private _sourceExpressionItem!: ExpressionItem;\n    private _sourceElement!: HTMLElement;\n    private _targetExpressionItem!: ExpressionItem;\n    private _dropUnder!: boolean;\n    private _ghostChipMousemoveSubscription$!: Subscription;\n    private _keyboardSubscription$!: Subscription;\n    private _keyDragCurrentIndex: number = 0;\n    private _keyDragInitialIndex: number = 0;\n    private _isKeyDragsFirstMove: boolean = true;\n    /** Stores a flat ordered list of possible drop locations as Tuple <[targetExpression, dropUnder]>, while performing the keyboard drag&drop */\n    private _possibleDropLocations!: Array<[ExpressionItem, boolean]>;\n    private _timeoutId: any;\n\n\n    /** Get the dragged ghost as a HTMLElement*/\n    private get getDragGhostElement(): HTMLElement {\n        return (document.querySelector(`.${QueryBuilderSelectors.CHIP_GHOST}[ghostclass=\"${QueryBuilderSelectors.CHIP_GHOST}\"]`) as HTMLElement);\n    }\n\n    /** Get the drop ghost chip component */\n    private get getDropGhostElement(): IgxChipComponent {\n        return this._queryBuilderTreeComponent.expressionsChips.find(x => x.data === this.dropGhostExpression)!;\n    }\n\n    private get getMainExpressionTree(): HTMLElement {\n        return this._queryBuilderTreeComponentElRef.nativeElement.querySelector(`.${QueryBuilderSelectors.FILTER_TREE}`);\n    }\n\n    /** Whether a chip is currently being dragged with the mouse */\n    private get isMouseDragInProgress(): boolean {\n        return !!this._sourceElement && !this.isKeyboardDrag;\n    }\n\n    /** Whether a chip is currently being dragged with the keyboard */\n    private get isKeyboardDragInProgress(): boolean {\n        return !!this._sourceElement && this.isKeyboardDrag;\n    }\n\n\n    public register(tree: IgxQueryBuilderTreeComponent, el: ElementRef) {\n        this._queryBuilderTreeComponent = tree;\n        this._queryBuilderTreeComponentElRef = el;\n    }\n\n    /** When chip is picked up for dragging\n     *\n     * @param sourceDragElement The HTML element of the chip that's been dragged\n     * @param sourceExpressionItem The expressionItem of the chip that's been dragged\n     * @param isKeyboardDrag If it's a mouse drag or keyboard reorder\n     * @param sourceChip The chip that's been mouse dragged\n     *\n    */\n    public onMoveStart(sourceDragElement: HTMLElement, sourceExpressionItem: ExpressionItem, isKeyboardDrag: boolean, sourceChip?: IgxChipComponent): void {\n        this.resetDragAndDrop(true);\n        this._queryBuilderTreeComponent._expressionTreeCopy = this._queryBuilderTreeComponent._expressionTree;\n        this.isKeyboardDrag = isKeyboardDrag;\n        this._sourceExpressionItem = sourceExpressionItem;\n        this._sourceElement = sourceDragElement;\n\n        this.listenToKeyboard();\n\n        if (!this.isKeyboardDrag) {\n            //Let the chip's igxDrag cancel the mouse drag on Escape, it's set before the drag subscribes to Escape\n            if (sourceChip) {\n                sourceChip.dragDirective.cancelOnEscape = true;\n            }\n            this._sourceElement.style.display = 'none';\n            this.setDragGhostZIndex();\n        }\n    }\n\n    /** When dragged chip is let go outside a proper drop zone, or its drag is cancelled\n     * @param event The chip's moveEnd event args\n    */\n    public onMoveEnd(event?: IBaseChipEventArgs): void {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        //If there is a ghost chip presented to the user and the drag isn't cancelled (e.g. with Escape), execute drop\n        const drop = !!this.dropGhostExpression && !(event?.originalEvent as IDragBaseEventArgs)?.cancelled;\n        if (drop) {\n            this.onChipDropped();\n        } else {\n            this.resetDragAndDrop(true);\n        }\n\n        this._ghostChipMousemoveSubscription$?.unsubscribe();\n        this._keyboardSubscription$?.unsubscribe();\n\n        if (!drop) {\n            this.startKeyboardDragOnFocusedIndicator();\n        }\n    }\n\n    /** When mouse drag enters a chip's area\n     * @param targetDragElement The HTML element of the drop area chip that's been dragged to\n     * @param targetExpressionItem The expressionItem of the drop area chip that's been dragged to\n    */\n    public onChipEnter(targetDragElement: HTMLElement, targetExpressionItem: ExpressionItem) {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        //If entering the one that's been picked up don't do any thing\n        if (targetExpressionItem === this.dropGhostExpression) {\n            return;\n        }\n\n        //Simulate leaving the last entered chip in case of no Leave event triggered due to the artificial drop zone of a north positioned ghost chip\n        if (this._targetExpressionItem) {\n            this.resetDragAndDrop(false);\n        }\n\n        this._targetExpressionItem = targetExpressionItem;\n\n        //Determine the middle point of the chip.\n        const appendUnder = this.ghostInLowerPart(targetDragElement);\n\n        this.renderDropGhostChip(appendUnder);\n    }\n\n    /** When mouse drag moves in a div's drop area\n     * @param targetDragElement The HTML element of the drop area chip that's been dragged to\n     * @param targetExpressionItem The expressionItem of the drop area chip that's been dragged to\n    */\n    public onDivOver(targetDragElement: HTMLElement, targetExpressionItem: ExpressionItem) {\n        if (this._targetExpressionItem === targetExpressionItem) {\n            this.onChipOver(targetDragElement)\n        } else {\n            this.onChipEnter(targetDragElement, targetExpressionItem);\n        }\n    }\n\n    /** When mouse drag moves in a chip's drop area\n     * @param targetDragElement The HTML element of the drop area chip that's been dragged to\n    */\n    public onChipOver(targetDragElement: HTMLElement): void {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        //Determine the middle point of the chip.\n        const appendUnder = this.ghostInLowerPart(targetDragElement);\n\n        this.renderDropGhostChip(appendUnder);\n    }\n\n    /** When mouse drag leaves a chip's drop area */\n    public onChipLeave() {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        //if the drag ghost is on the drop ghost row don't trigger leave\n        if (this.dragGhostIsOnDropGhostRow()) {\n            return;\n        }\n\n        if (this._targetExpressionItem) {\n            this.resetDragAndDrop(false)\n        }\n    }\n\n    /** When dragged chip is let go in div's drop area\n     * @param targetExpressionItem The expressionItem of the drop area chip that's been dragged to\n    */\n    public onDivDropped(targetExpressionItem: ExpressionItem) {\n        if (targetExpressionItem !== this._sourceExpressionItem) {\n            this.onChipDropped();\n        }\n    }\n\n    /** When dragged chip is let go in chip's drop area */\n    public onChipDropped() {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        //Determine which chip to be focused after drop completes\n        const [dropLocationIndex, _] = this.countChipsBeforeDropLocation(this._queryBuilderTreeComponent.rootGroup);\n\n        //Delete from old place\n        this._queryBuilderTreeComponent.deleteItem(this._sourceExpressionItem);\n        this.dropGhostExpression = null!;\n\n        this._queryBuilderTreeComponent.focusChipAfterDrag(dropLocationIndex);\n\n        this.resetDragAndDrop(true);\n\n        this._queryBuilderTreeComponent.exitEditAddMode();\n    }\n\n    /** When mouse drag moves in a AND/OR drop area\n     * @param targetDragElement The HTML element of the drop area chip that's been dragged to\n     * @param targetExpressionItem The expressionItem of the drop area chip that's been dragged to\n    */\n    public onGroupRootOver(targetDragElement: HTMLElement, targetExpressionItem: ExpressionGroupItem) {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        let newTargetExpressionItem;\n\n        if (this.ghostInLowerPart(targetDragElement) || !targetExpressionItem.parent) {\n            //if ghost is in lower part of the AND/OR (or it's the main group) => drop as first child of that group\n            //accounting for the fact that the drop ghost might already be there as first child\n            if (targetExpressionItem.children[0] !== this.dropGhostExpression) {\n                newTargetExpressionItem = targetExpressionItem.children[0];\n            } else {\n                newTargetExpressionItem = targetExpressionItem.children[1];\n            }\n        } else {\n            //if ghost is in upper part => drop before the group starts\n            newTargetExpressionItem = targetExpressionItem;\n        }\n\n        if (this._targetExpressionItem !== newTargetExpressionItem) {\n            this.resetDragAndDrop(false);\n            this._targetExpressionItem = newTargetExpressionItem;\n            this.renderDropGhostChip(false);\n        }\n    }\n\n    /** When mouse drag moves in 'Add condition' button's drop area\n     * @param addConditionElement The Add condition button HTML Element\n     * @param rootGroup The root group of the query tree\n    */\n    public onAddConditionEnter(addConditionElement: HTMLElement, rootGroup: ExpressionGroupItem) {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n        const lastElement = addConditionElement.parentElement!.previousElementSibling!.lastElementChild;\n\n        //simulate entering in the lower part of the last chip/group\n        this.onChipEnter(lastElement as HTMLElement, rootGroup.children[rootGroup.children.length - 1]);\n    }\n\n    /** When chip's drag indicator is focused\n     *\n     * @param sourceDragElement The HTML element of the chip that's been dragged\n     * @param sourceExpressionItem The expressionItem of the chip that's been dragged\n     *\n    */\n    public onChipDragIndicatorFocus(sourceDragElement: HTMLElement, sourceExpressionItem: ExpressionItem) {\n        //if drag is not underway, already (a mouse drag may not have rendered a drop ghost yet)\n        if (!this.getDropGhostElement && !this.isMouseDragInProgress) {\n            this.onMoveStart(sourceDragElement, sourceExpressionItem, true);\n        }\n    }\n\n    /** When chip's drag indicator looses focus*/\n    public onChipDragIndicatorFocusOut() {\n        if (this._sourceElement?.style?.display !== 'none') {\n            this.resetDragAndDrop(true);\n            this._keyboardSubscription$?.unsubscribe();\n        }\n    }\n\n    /** Upon blurring the tree, if Keyboard drag is underway and the next active item is not the drop ghost's drag indicator icon, cancel the drag&drop procedure*/\n    public onDragFocusOut() {\n        if (this.isKeyboardDrag && this.getDropGhostElement) {\n            //have to wait a tick because upon blur, the next activeElement is always body, right before the next element gains focus\n            setTimeout(() => {\n                if (document.activeElement!.className.indexOf(QueryBuilderSelectors.DRAG_INDICATOR) === -1) {\n                    this.resetDragAndDrop(true);\n                    this._keyboardSubscription$?.unsubscribe();\n                }\n            }, 0);\n        }\n    }\n\n    /** Starts a keyboard drag for the chip whose drag indicator is focused, since focusing it while mouse dragging is ignored */\n    private startKeyboardDragOnFocusedIndicator() {\n        const focusedElement = document.activeElement;\n        if (!focusedElement?.classList.contains(QueryBuilderSelectors.DRAG_INDICATOR)) {\n            return;\n        }\n\n        const chip = this._queryBuilderTreeComponent.expressionsChips.find(c => c.nativeElement.contains(focusedElement));\n        if (chip) {\n            this.onChipDragIndicatorFocus(chip.nativeElement.parentElement!, chip.data);\n        }\n    }\n\n    /** Checks if the dragged ghost is horizontally on the same line with the drop ghost*/\n    private dragGhostIsOnDropGhostRow() {\n        const dragGhostBounds = this.getDragGhostElement.getBoundingClientRect();\n\n        const dropGhostBounds = this.getDropGhostElement?.nativeElement?.parentElement!.getBoundingClientRect();\n\n        if (!dragGhostBounds || !dropGhostBounds) {\n            return false;\n        }\n\n        const tolerance = dragGhostBounds.bottom - dragGhostBounds.top;\n\n        return !(dragGhostBounds.bottom < dropGhostBounds.top - tolerance || dragGhostBounds.top > dropGhostBounds.bottom + tolerance);\n    }\n\n    /** Checks if the dragged ghost is north or south of a target element's center*/\n    private ghostInLowerPart(ofElement: HTMLElement) {\n        const ghostBounds = this.getDragGhostElement.getBoundingClientRect();\n        const targetBounds = ofElement.getBoundingClientRect();\n\n        return ((ghostBounds.top + ghostBounds.bottom) / 2) >= ((targetBounds.top + targetBounds.bottom) / 2);\n    }\n\n    /** Make a copy of the _sourceExpressionItem's chip and paste it in the tree north or south of the _targetExpressionItem's chip */\n    private renderDropGhostChip(appendUnder: boolean): void {\n        if (appendUnder !== this._dropUnder || this.isKeyboardDrag) {\n            this.clearDropGhost();\n\n            //Copy dragged chip\n            const dragCopy = { ...this._sourceExpressionItem };\n            dragCopy.parent = this._targetExpressionItem.parent;\n            this.dropGhostExpression = dragCopy;\n\n            //Paste chip\n            this._dropUnder = appendUnder;\n            const pasteIndex = this._targetExpressionItem.parent.children.indexOf(this._targetExpressionItem);\n            this._targetExpressionItem.parent.children.splice(pasteIndex + (this._dropUnder ? 1 : 0), 0, dragCopy);\n        }\n\n        //Put focus on the drag icon of the ghost while performing keyboard drag\n        if (this.isKeyboardDrag) {\n            setTimeout(() => { // this will make the execution after the drop ghost is rendered\n                const dropGhostDragIndicator = this.getDropGhostElement?.nativeElement?.querySelector(`.${QueryBuilderSelectors.DRAG_INDICATOR}`) as HTMLElement;\n                if (dropGhostDragIndicator) {\n                    dropGhostDragIndicator.focus();\n                }\n            }, 0);\n        }\n\n        //Attach a mousemove event listener (if not already in place) to the dragged ghost (if present)\n        if (!this.isKeyboardDrag && this.getDragGhostElement && (!this._ghostChipMousemoveSubscription$ || this._ghostChipMousemoveSubscription$?.closed === true)) {\n            const mouseMoves = fromEvent<MouseEvent>(this.getDragGhostElement, 'mousemove');\n\n            //When mouse moves and there is a drop ghost => trigger onChipLeave to check if the drop ghost has to be removed\n            //effectively solving the case when mouse leaves the QB and a drop ghost is still in place\n            this._ghostChipMousemoveSubscription$ = mouseMoves.pipe(sampleTime(100)).subscribe(() => {\n                if (this.getDropGhostElement) {\n                    this.onChipLeave();\n                }\n            });\n        }\n\n        this.setDragCursor('grab');\n    }\n\n    /** Set the cursor when dragging a ghost*/\n    private setDragCursor(cursor: string) {\n        if (this.getDragGhostElement) {\n            this.getDragGhostElement.style.cursor = cursor;\n        }\n    }\n\n    /** Removes the drop ghost expression from the tree and it's chip effectively  */\n    private clearDropGhost() {\n        if (this.dropGhostExpression) {\n            const children = this.dropGhostExpression.parent.children;\n            const delIndex = children.indexOf(this.dropGhostExpression);\n            children.splice(delIndex, 1);\n            this.dropGhostExpression = null!;\n        }\n    }\n\n    /** Reset Drag&Drop vars. Optionally the drag source vars too*/\n    private resetDragAndDrop(clearDragged: boolean) {\n        this._targetExpressionItem = null!;\n        this._dropUnder = null!;\n        this.clearDropGhost();\n        this._keyDragInitialIndex = 0;\n        this._keyDragCurrentIndex = 0;\n        this._possibleDropLocations = null!;\n        this._isKeyDragsFirstMove = true;\n        this.setDragCursor('no-drop');\n\n        if (this._queryBuilderTreeComponent._expressionTreeCopy) {\n            this._queryBuilderTreeComponent._expressionTree = this._queryBuilderTreeComponent._expressionTreeCopy;\n        }\n\n        if ((clearDragged || this.isKeyboardDrag) && this._sourceElement) {\n            this._sourceElement.style.display = '';\n        }\n\n        if (clearDragged) {\n            this._queryBuilderTreeComponent._expressionTreeCopy = null!;\n            this._sourceExpressionItem = null!;\n            this._sourceElement = null!;\n        }\n    }\n\n    /** Start listening for drag and drop specific keys */\n    private listenToKeyboard() {\n        this._keyboardSubscription$?.unsubscribe();\n        this._keyboardSubscription$ = fromEvent<KeyboardEvent>(this.getMainExpressionTree, 'keydown')\n            .pipe(filter(e => ['ArrowUp', 'ArrowDown', 'Enter', ' ', 'Space', 'Escape', 'Tab'].includes(e.key)))\n            //Keep the browser from scrolling on the keys that move or drop a keyboard-dragged chip (held keys included)\n            //and inhibit Tabs once there's a drop ghost (don't allow to lose focus of the drop ghost's drag indicator)\n            .pipe(tap(e => {\n                if (this.isKeyboardDragInProgress &&\n                    (e.key === 'ArrowUp' || e.key === 'ArrowDown' ||\n                        (this.dropGhostExpression && (e.key === 'Enter' || e.key === ' ' || e.key === 'Space' || e.key === 'Tab')))) {\n                    e.preventDefault();\n                }\n            }))\n            .pipe(filter(event => !event.repeat))\n            .subscribe(e => {\n                if (this.isMouseDragInProgress) {\n                    //A mouse-dragged chip follows the pointer only, it's dropped on release or cancelled with Escape by the chip's igxDrag\n                    return;\n                } else if (e.key === 'Escape') {\n                    this.resetDragAndDrop(false);\n                    //Regain focus on the drag icon after keyboard drag cancel\n                    if (this.isKeyboardDrag) {\n                        (this._sourceElement.firstElementChild!.firstElementChild!.firstElementChild!.firstElementChild as HTMLElement).focus();\n                    }\n                } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n                    this.arrowDrag(e.key);\n                } else if (e.key === 'Enter' || e.key === ' ' || e.key === 'Space') {\n                    //this.platform.isActivationKey(eventArgs) Maybe use this rather that Enter/Space?\n                    //Without a drop ghost there is no drop target yet; committing would only delete the source expression.\n                    if (this.dropGhostExpression) {\n                        this.onChipDropped();\n                        this._keyboardSubscription$.unsubscribe();\n                    }\n                }\n            });\n    }\n\n    /** Perform up/down movement of drop ghost along the expression tree*/\n    private arrowDrag(key: 'ArrowUp' | 'ArrowDown') {\n        if (!this._sourceElement || !this._sourceExpressionItem) {\n            return;\n        }\n\n        const rootGroup = this._queryBuilderTreeComponent.rootGroup;\n\n        if (this._isKeyDragsFirstMove) {\n            this._possibleDropLocations = this.getPossibleDropLocations(rootGroup, true);\n            this._keyDragInitialIndex = this._possibleDropLocations.findIndex(e => e[0] === this._sourceExpressionItem && e[1] === true);\n            this._keyDragCurrentIndex = this._keyDragInitialIndex;\n            if (this._keyDragInitialIndex === -1) {\n                console.error(\"Dragged expression not found\");\n            }\n            this._sourceElement.style.display = 'none';\n        }\n\n        let newKeyIndexOffset = this._keyDragCurrentIndex;\n        if (key === 'ArrowUp') {\n            //decrease index capped at top of tree\n            newKeyIndexOffset && newKeyIndexOffset--;\n        } else {\n            //increase index capped at bottom of tree\n            newKeyIndexOffset < this._possibleDropLocations.length - 1 && newKeyIndexOffset++;\n        }\n\n        //if drop location has no change\n        if (newKeyIndexOffset !== this._keyDragCurrentIndex || this._isKeyDragsFirstMove) {\n            this._keyDragCurrentIndex = newKeyIndexOffset;\n\n            const newDropTarget = this._possibleDropLocations[this._keyDragCurrentIndex];\n            this._targetExpressionItem = newDropTarget[0]\n\n            this.renderDropGhostChip(newDropTarget[1]);\n\n            //Situations when drop ghost hasn't really moved, run one more time\n            if (this._keyDragCurrentIndex === this._keyDragInitialIndex ||\n                (this._isKeyDragsFirstMove && this._keyDragCurrentIndex === this._keyDragInitialIndex - 1)) {\n                this._isKeyDragsFirstMove = false;\n                this.arrowDrag(key);\n            }\n\n            this._isKeyDragsFirstMove = false;\n        }\n\n        return;\n    }\n\n    /** Produces a flat ordered list of possible drop locations as Tuple <[targetExpression, dropUnder]>, while performing the keyboard drag&drop */\n    private getPossibleDropLocations(group: ExpressionGroupItem, isRoot: boolean): Array<[ExpressionItem, boolean]> {\n        const result = new Array() as Array<[ExpressionItem, boolean]>;\n\n        //Add dropZone under AND/OR (as first child of group)\n        result.push([(group as ExpressionGroupItem).children[0], false]);\n\n        for (let i = 0; i < group.children.length; i++) {\n            if (group.children[i] instanceof ExpressionGroupItem) {\n                result.push(...this.getPossibleDropLocations(group.children[i] as ExpressionGroupItem, false));\n            } else {\n                result.push([group.children[i], true]);\n            }\n        }\n\n        //Add dropZone under the whole group\n        if (!isRoot) {\n            result.push([group, true]);\n        }\n\n        return result;\n    }\n\n    /** Counts how many chips will be in the tree (from top to bottom) before the dropped one */\n    private countChipsBeforeDropLocation(group: ExpressionGroupItem): [number, boolean] {\n        let count = 0, totalCount = 0, targetReached = false;\n\n        for (let i = 0; i < group.children.length; i++) {\n            const child = group.children[i];\n\n            if (targetReached) {\n                break;\n            }\n\n            if (child instanceof ExpressionGroupItem) {\n                if (child === this._targetExpressionItem) {\n                    if (this._dropUnder) {\n                        [count] = this.countChipsBeforeDropLocation(child as ExpressionGroupItem);\n                        totalCount += count;\n                    }\n                    targetReached = true;\n                } else {\n                    [count, targetReached] = this.countChipsBeforeDropLocation(child as ExpressionGroupItem);\n                    totalCount += count;\n                }\n            } else {\n                if (child !== this._sourceExpressionItem && //not the hidden source chip\n                    child !== this.dropGhostExpression && //not the drop ghost\n                    !((child as ExpressionOperandItem).inEditMode && this._queryBuilderTreeComponent.operandCanBeCommitted() !== true) //not a chip in edit mode that will be discarded\n                ) {\n                    totalCount++;\n                }\n\n                if (child === this._targetExpressionItem) {\n                    targetReached = true;\n                    if (!this._dropUnder &&\n                        !((child as ExpressionOperandItem).inEditMode && this._queryBuilderTreeComponent.operandCanBeCommitted() !== true)) {\n                        totalCount--;\n                    }\n                }\n            }\n        }\n\n        totalCount === -1 && totalCount++;\n\n        return [totalCount, targetReached];\n    }\n\n    /** Sets the z-index of the drag ghost with a little delay, since we don't have access to ghostCreated() but we know it's executed right after moveStart() */\n    private setDragGhostZIndex() {\n        if (this._timeoutId) {\n            clearTimeout(this._timeoutId);\n        }\n\n        this._timeoutId = setTimeout(() => {\n            if (this.getDragGhostElement?.style) {\n                this.getDragGhostElement.style.zIndex = `${Z_INDEX_TO_SET}`;\n            }\n        }, DEFAULT_SET_Z_INDEX_DELAY);\n    }\n}\n","import { AfterViewInit, EventEmitter, LOCALE_ID, Output, TemplateRef, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { NgTemplateOutlet, NgClass } from '@angular/common';\n\nimport {\n    Component, Input, ViewChild, ChangeDetectorRef, ViewChildren, QueryList, ElementRef, OnDestroy, HostBinding\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { IgxChipComponent } from 'igniteui-angular/chips';\nimport {\n    IQueryBuilderResourceStrings,\n    QueryBuilderResourceStringsEN,\n    PlatformUtil,\n    trackByIdentity,\n    GridColumnDataType,\n    DataUtil,\n    IgxBooleanFilteringOperand,\n    IgxDateFilteringOperand,\n    IgxDateTimeFilteringOperand,\n    IgxNumberFilteringOperand,\n    IgxStringFilteringOperand,\n    IgxTimeFilteringOperand,\n    FilteringLogic,\n    IFilteringExpression,\n    FilteringExpressionsTree,\n    IExpressionTree,\n    IFilteringExpressionsTree,\n    FieldType,\n    EntityType,\n    HorizontalAlignment,\n    OverlaySettings,\n    VerticalAlignment,\n    AbsoluteScrollStrategy,\n    AutoPositionStrategy,\n    ConnectedPositioningStrategy,\n    IgxPickerToggleComponent,\n    IgxPickerClearComponent,\n    getCurrentResourceStrings,\n    DEFAULT_LOCALE,\n    onResourceChangeHandle,\n    IgxDateFormatterPipe,\n    isTree\n} from 'igniteui-angular/core';\nimport { IgxDatePickerComponent } from 'igniteui-angular/date-picker';\n\nimport {\n    IgxButtonDirective,\n    IgxDateTimeEditorDirective,\n    IgxIconButtonDirective,\n    IgxTooltipDirective,\n    IgxTooltipTargetDirective,\n    IgxDragIgnoreDirective,\n    IgxDropDirective\n} from 'igniteui-angular/directives';\nimport { IgxSelectComponent } from 'igniteui-angular/select';\nimport { IgxTimePickerComponent } from 'igniteui-angular/time-picker';\nimport { IgxInputGroupComponent, IgxInputDirective, IgxPrefixDirective } from 'igniteui-angular/input-group';\nimport { IgxSelectItemComponent } from 'igniteui-angular/select';\nimport { IgxIconComponent } from 'igniteui-angular/icon';\nimport { IComboSelectionChangingEventArgs, IgxComboComponent, IgxComboHeaderDirective } from 'igniteui-angular/combo';\nimport { IgxCheckboxComponent, IChangeCheckboxEventArgs } from 'igniteui-angular/checkbox';\nimport { IgxDialogComponent } from 'igniteui-angular/dialog';\nimport {\n    ISelectionEventArgs,\n    IgxDropDownComponent,\n    IgxDropDownItemComponent,\n    IgxDropDownItemNavigationDirective\n} from 'igniteui-angular/drop-down';\nimport { IgxQueryBuilderComponent } from './query-builder.component';\nimport { IgxQueryBuilderDragService } from './query-builder-drag.service';\nimport { ExpressionGroupItem, ExpressionItem, ExpressionOperandItem, IgxFieldFormatterPipe, IgxQueryBuilderSearchValueContext } from './query-builder.common';\nimport { getCurrentI18n, IResourceChangeEventArgs } from 'igniteui-i18n-core';\n\nconst DEFAULT_PIPE_DATE_FORMAT = 'mediumDate';\nconst DEFAULT_PIPE_TIME_FORMAT = 'mediumTime';\nconst DEFAULT_PIPE_DATE_TIME_FORMAT = 'medium';\nconst DEFAULT_PIPE_DIGITS_INFO = '1.0-3';\nconst DEFAULT_CHIP_FOCUS_DELAY = 50;\n\n/** @hidden */\n@Component({\n    selector: 'igx-query-builder-tree',\n    templateUrl: './query-builder-tree.component.html',\n    host: { 'class': 'igx-query-builder-tree' },\n    imports: [\n        IgxDateFormatterPipe,\n        FormsModule,\n        IgxButtonDirective,\n        IgxCheckboxComponent,\n        IgxChipComponent,\n        IgxComboComponent,\n        IgxComboHeaderDirective,\n        IgxDatePickerComponent,\n        IgxDateTimeEditorDirective,\n        IgxDialogComponent,\n        IgxDragIgnoreDirective,\n        IgxDropDirective,\n        IgxDropDownComponent,\n        IgxDropDownItemComponent,\n        IgxDropDownItemNavigationDirective,\n        IgxFieldFormatterPipe,\n        IgxIconButtonDirective,\n        IgxIconComponent,\n        IgxInputDirective,\n        IgxInputGroupComponent,\n        IgxPickerClearComponent,\n        IgxPickerToggleComponent,\n        IgxPrefixDirective,\n        IgxSelectComponent,\n        IgxSelectItemComponent,\n        IgxTimePickerComponent,\n        IgxTooltipDirective,\n        IgxTooltipTargetDirective,\n        NgClass,\n        NgTemplateOutlet\n    ],\n    changeDetection: ChangeDetectionStrategy.Eager,\n    providers: [\n        IgxQueryBuilderDragService\n    ],\n})\nexport class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {\n    public cdr = inject(ChangeDetectorRef);\n    public dragService = inject(IgxQueryBuilderDragService);\n    protected platform = inject(PlatformUtil);\n    private elRef = inject(ElementRef);\n    protected _localeId = inject(LOCALE_ID);\n\n    /**\n     * @hidden @internal\n     */\n    public _expressionTree!: IExpressionTree;\n\n    /**\n     * @hidden @internal\n     */\n    public _expressionTreeCopy!: IExpressionTree;\n\n    /**\n     * @hidden @internal\n     */\n    @HostBinding('class') public get getClass() {\n        return `igx-query-builder-tree--level-${this.level}`;\n    }\n\n    /**\n     * Sets/gets the entities.\n     */\n    @Input()\n    public entities: EntityType[] | undefined;\n\n    /**\n     * Sets/gets the parent query builder component.\n     */\n    @Input()\n    public queryBuilder!: IgxQueryBuilderComponent;\n\n    /**\n     * Sets/gets the search value template.\n     */\n    @Input()\n    public searchValueTemplate: TemplateRef<IgxQueryBuilderSearchValueContext> = null!;\n\n    /**\n    * Returns the parent expression operand.\n    */\n    @Input()\n    public get parentExpression(): ExpressionOperandItem {\n        return this._parentExpression;\n    }\n\n    /**\n     * Sets the parent expression operand.\n     */\n    public set parentExpression(value: ExpressionOperandItem) {\n        this._parentExpression = value;\n    }\n\n    /**\n    * Returns the fields.\n    */\n    public get fields(): FieldType[] {\n        if (!this._fields && this.isAdvancedFiltering()) {\n            this._fields = this.entities![0].fields;\n        }\n\n        return this._fields;\n    }\n\n    /**\n     * Sets the fields.\n     */\n    @Input()\n    public set fields(fields: FieldType[]) {\n        this._fields = fields;\n\n        this._fields = this._fields?.map(f => ({...f, filters: this.getFilters(f), pipeArgs: this.getPipeArgs(f) }));\n\n        if (!this._fields && this.isAdvancedFiltering()) {\n            this._fields = this.entities![0].fields;\n        }\n    }\n\n    /**\n    * Returns the expression tree.\n    */\n    public get expressionTree(): IExpressionTree {\n        return this._expressionTree;\n    }\n\n    /**\n     * Sets the expression tree.\n     */\n    @Input()\n    public set expressionTree(expressionTree: IExpressionTree) {\n        this._expressionTree = expressionTree;\n        if (!expressionTree) {\n            this._selectedEntity = this.isAdvancedFiltering() && this.entities!.length === 1 ? this.entities![0] : null!;\n            this._selectedReturnFields = this._selectedEntity ? this._selectedEntity.fields?.map(f => f.field) : [];\n        }\n\n        if (!this._preventInit) {\n            this.init();\n        }\n    }\n\n    /**\n     * Gets the `locale` of the query builder.\n     * If not set, defaults to application's locale.\n     */\n    @Input()\n    public get locale(): string {\n        return this._locale || this._defaultLocale;\n    }\n\n    /**\n     * Sets the `locale` of the query builder.\n     * Expects a valid BCP 47 language tag.\n     */\n    public set locale(value: string) {\n        this._locale = value;\n        this.updateResources(this._locale);\n    }\n\n    /**\n     * Sets the resource strings.\n     * By default it uses EN resources.\n     */\n    @Input()\n    public set resourceStrings(value: IQueryBuilderResourceStrings) {\n        this._resourceStrings = value;\n        this._customResourceStrings = this._resourceStrings ? Object.assign({}, this._defaultResourceStrings, this._resourceStrings) : null!;\n    }\n\n    /**\n     * Returns the resource strings.\n     */\n    public get resourceStrings(): IQueryBuilderResourceStrings {\n        return this._resourceStrings ? this._customResourceStrings : this._defaultResourceStrings;\n    }\n\n    /**\n     * Gets/sets the expected return field.\n     */\n    @Input() public expectedReturnField: string | undefined;\n\n    /**\n     * Event fired as the expression tree is changed.\n     */\n    @Output()\n    public expressionTreeChange = new EventEmitter<IExpressionTree>();\n\n    /**\n     * Event fired if a nested query builder tree is being edited.\n     */\n    @Output()\n    public inEditModeChange = new EventEmitter<ExpressionOperandItem>();\n\n    @ViewChild('entitySelect', { read: IgxSelectComponent })\n    protected entitySelect!: IgxSelectComponent;\n\n    @ViewChild('editingInputs', { read: ElementRef })\n    private editingInputs!: ElementRef;\n\n    @ViewChild('returnFieldsCombo', { read: IgxComboComponent })\n    private returnFieldsCombo!: IgxComboComponent;\n\n    @ViewChild('returnFieldSelect', { read: IgxSelectComponent })\n    protected returnFieldSelect!: IgxSelectComponent;\n\n    @ViewChild('fieldSelect', { read: IgxSelectComponent })\n    private fieldSelect!: IgxSelectComponent;\n\n    @ViewChild('conditionSelect', { read: IgxSelectComponent })\n    private conditionSelect!: IgxSelectComponent;\n\n    @ViewChild('searchValueInput', { read: ElementRef })\n    private searchValueInput!: ElementRef;\n\n    @ViewChild('picker')\n    private picker!: IgxDatePickerComponent | IgxTimePickerComponent;\n\n    @ViewChild('addConditionButton', { read: ElementRef })\n    private addConditionButton!: ElementRef;\n\n    @ViewChild('entityChangeDialog', { read: IgxDialogComponent })\n    private entityChangeDialog!: IgxDialogComponent;\n\n    @ViewChild('addOptionsDropDown', { read: IgxDropDownComponent })\n    private addExpressionItemDropDown!: IgxDropDownComponent;\n\n    @ViewChild('groupContextMenuDropDown', { read: IgxDropDownComponent })\n    private groupContextMenuDropDown!: IgxDropDownComponent;\n\n    /**\n     * @hidden @internal\n     */\n    @ViewChildren(IgxChipComponent, { read: IgxChipComponent })\n    public expressionsChips!: QueryList<IgxChipComponent>;\n\n    @ViewChild('editingInputsContainer', { read: ElementRef })\n    protected set editingInputsContainer(value: ElementRef) {\n        if ((value && !this._editingInputsContainer) ||\n            (value && this._editingInputsContainer && this._editingInputsContainer.nativeElement !== value.nativeElement)) {\n            requestAnimationFrame(() => {\n                this.scrollElementIntoView(value.nativeElement);\n            });\n        }\n\n        this._editingInputsContainer = value;\n    }\n\n    @ViewChild('currentGroupButtonsContainer', { read: ElementRef })\n    protected set currentGroupButtonsContainer(value: ElementRef) {\n        if ((value && !this._currentGroupButtonsContainer) ||\n            (value && this._currentGroupButtonsContainer && this._currentGroupButtonsContainer.nativeElement !== value.nativeElement)) {\n            requestAnimationFrame(() => {\n                this.scrollElementIntoView(value.nativeElement);\n            });\n        }\n\n        this._currentGroupButtonsContainer = value;\n    }\n\n    @ViewChild('expressionsContainer')\n    private expressionsContainer!: ElementRef;\n\n    @ViewChildren(IgxQueryBuilderTreeComponent)\n    private innerQueries!: QueryList<IgxQueryBuilderTreeComponent>;\n\n    /**\n     * @hidden @internal\n     */\n    public innerQueryNewExpressionTree!: IExpressionTree;\n\n    /**\n     * @hidden @internal\n     */\n    public rootGroup!: ExpressionGroupItem;\n\n    /**\n     * @hidden @internal\n     */\n    public selectedExpressions: ExpressionOperandItem[] = [];\n\n    /**\n     * @hidden @internal\n     */\n    public currentGroup!: ExpressionGroupItem;\n\n    /**\n     * @hidden @internal\n     */\n    public contextualGroup!: ExpressionGroupItem;\n\n    /**\n     * @hidden @internal\n     */\n    public filteringLogics: any;\n\n    /**\n     * @hidden @internal\n     */\n    public selectedCondition!: string;\n\n    /**\n     * @hidden @internal\n     */\n    public searchValue: { value: any } = { value: null };\n\n    /**\n     * @hidden @internal\n     */\n    public prevFocusedExpression!: ExpressionOperandItem;\n\n    /**\n     * @hidden @internal\n     */\n    public initialOperator = 0;\n\n    /**\n     * @hidden @internal\n     */\n    public returnFieldSelectOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    /**\n     * @hidden @internal\n     */\n    public entitySelectOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    /**\n     * @hidden @internal\n     */\n    public fieldSelectOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    /**\n     * @hidden @internal\n     */\n    public conditionSelectOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    /**\n     * @hidden @internal\n     */\n    public addExpressionDropDownOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    /**\n     * @hidden @internal\n     */\n    public groupContextMenuDropDownOverlaySettings: OverlaySettings = {\n        scrollStrategy: new AbsoluteScrollStrategy(),\n        modal: false,\n        closeOnOutsideClick: true\n    };\n\n    private destroy$ = new Subject<any>();\n    private _timeoutId: any;\n    private _lastFocusedChipIndex!: number;\n    private _focusDelay = DEFAULT_CHIP_FOCUS_DELAY;\n    private _parentExpression!: ExpressionOperandItem;\n    private _selectedEntity!: EntityType;\n    private _selectedReturnFields!: string[];\n    private _selectedField: FieldType | null = null;\n    private _editingInputsContainer!: ElementRef;\n    private _currentGroupButtonsContainer!: ElementRef;\n    private _addModeExpression!: ExpressionOperandItem;\n    private _editedExpression!: ExpressionOperandItem;\n    private _preventInit = false;\n    private _prevFocusedContainer: HTMLElement | null = null;\n    private _fields!: FieldType[];\n    private _locale?: string;\n    private _defaultLocale!: string;\n    private _entityNewValue!: EntityType;\n    private _resourceStrings: IQueryBuilderResourceStrings | null = null;\n    private _customResourceStrings: IQueryBuilderResourceStrings = null!;\n    private _defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN);\n\n    /**\n     * Returns if the select entity dropdown at the root level is disabled after the initial selection.\n     */\n    public get disableEntityChange(): boolean {\n\n        return !this.parentExpression && this.selectedEntity ? this.queryBuilder.disableEntityChange : false;\n    }\n\n    /**\n     * Returns if the fields combo at the root level is disabled.\n     */\n    public get disableReturnFieldsChange(): boolean {\n\n        return !this.selectedEntity || this.queryBuilder.disableReturnFieldsChange;\n    }\n\n    /**\n     * Returns the current level.\n     */\n    public get level(): number {\n        let parent = this.elRef.nativeElement.parentElement;\n        let _level = 0;\n        while (parent) {\n            if (parent.localName === 'igx-query-builder-tree') {\n                _level++;\n            }\n            parent = parent.parentElement;\n        }\n        return _level;\n    }\n\n    /** @hidden */\n    protected isAdvancedFiltering(): boolean {\n        return (this.entities?.length === 1 && !this.entities[0]?.name) ||\n            this.entities?.find(e => e.childEntities?.length! > 0) !== undefined ||\n            ((this.entities?.length ?? 0) > 0 && (this.queryBuilder?.entities?.length ?? 0) > 0 && this.entities !== this.queryBuilder?.entities);\n    }\n\n    /** @hidden */\n    protected isHierarchicalNestedQuery(): boolean {\n        return this.queryBuilder.entities !== this.entities\n    }\n\n    /** @hidden */\n    protected isSearchValueInputDisabled(): boolean {\n        return !this.selectedField ||\n            !this.selectedCondition ||\n            (this.selectedField &&\n                (this.selectedField.filters!.condition(this.selectedCondition).isUnary ||\n                    this.selectedField.filters!.condition(this.selectedCondition).isNestedQuery))!;\n    }\n\n    constructor() {\n        this.initLocale();\n        this.dragService.register(this, this.elRef);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public ngAfterViewInit(): void {\n        if (this.isAdvancedFiltering() && this.entities?.length === 1) {\n            this.selectedEntity = this.entities![0].name;\n            if (this._selectedEntity.fields.find(f => f.field === this.expectedReturnField)) {\n                this._selectedReturnFields = [this.expectedReturnField!];\n            }\n        }\n\n        // Trigger additional change detection cycle\n        this.cdr.detectChanges();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public ngOnDestroy(): void {\n        this.destroy$.next(true);\n        this.destroy$.complete();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public set selectedEntity(value: string) {\n        this._selectedEntity = this.entities?.find(el => el.name === value)!;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public get selectedEntity(): EntityType {\n        return this._selectedEntity;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onEntitySelectChanging(event: ISelectionEventArgs) {\n        event.cancel = true;\n        this._entityNewValue = event.newSelection.value;\n        if (event.oldSelection.value && this.queryBuilder.showEntityChangeDialog) {\n            this.entityChangeDialog.open();\n        } else {\n            this.onEntityChangeConfirm();\n        }\n    }\n\n    /**\n     * @hidden\n     */\n    public onShowEntityChangeDialogChange(eventArgs: IChangeCheckboxEventArgs) {\n        this.queryBuilder.showEntityChangeDialog = !eventArgs.checked;\n    }\n\n    /**\n     * @hidden\n     */\n    public onEntityChangeCancel() {\n        this.entityChangeDialog.close();\n        this.entitySelect.close();\n        this._entityNewValue = null!;\n    }\n\n    /**\n     * @hidden\n     */\n    public onEntityChangeConfirm() {\n        if (this._parentExpression) {\n            this._expressionTree = this.createExpressionTreeFromGroupItem(this.createExpressionGroupItem(this._expressionTree));\n        }\n\n        this._selectedEntity = this._entityNewValue;\n        if (!this._selectedEntity.fields) {\n            this._selectedEntity.fields = [];\n        }\n        this.fields = this._entityNewValue ? this._entityNewValue.fields : [];\n\n        if (this._selectedEntity.fields.find(f => f.field === this.expectedReturnField)) {\n            this._selectedReturnFields = [this.expectedReturnField!];\n        } else {\n            this._selectedReturnFields = this.parentExpression ? [] : this._entityNewValue.fields?.map(f => f.field);\n        }\n\n        if (this._expressionTree) {\n            this._expressionTree.entity = this._entityNewValue.name;\n\n            this._expressionTree.returnFields = this.fields.length === this._selectedReturnFields.length ? ['*'] : this._selectedReturnFields;\n\n            this._expressionTree.filteringOperands = [];\n\n            this._editedExpression = null!;\n            if (!this.parentExpression) {\n                this.expressionTreeChange.emit(this._expressionTree);\n            }\n\n            this.rootGroup = null!;\n            this.currentGroup = this.rootGroup;\n        }\n\n        this._selectedField = null;\n        this.selectedCondition = null!;\n        this.searchValue.value = null;\n\n        this.entityChangeDialog.close();\n        this.entitySelect.close();\n\n        this._entityNewValue = null!;\n        this.innerQueryNewExpressionTree = null!;\n\n        this.initExpressionTree(this._selectedEntity.name, this.selectedReturnFields);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public set selectedReturnFields(value: string[]) {\n        if (this._selectedReturnFields !== value) {\n            this._selectedReturnFields = value;\n\n            if (this._expressionTree && !this.parentExpression) {\n                this._expressionTree.returnFields = value.length === this.fields.length ? ['*'] : value;\n                this.expressionTreeChange.emit(this._expressionTree);\n            }\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public get selectedReturnFields(): string[] {\n        return this._selectedReturnFields;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public set selectedField(value: FieldType | null) {\n        const oldValue = this._selectedField;\n\n        if (this._selectedField !== value) {\n            this._selectedField = value;\n            if (this._selectedField && !this._selectedField.dataType) {\n                this._selectedField.filters = this.getFilters(this._selectedField);\n            }\n\n            this.selectDefaultCondition();\n            if (oldValue && this._selectedField && this._selectedField.dataType !== oldValue.dataType) {\n                this.searchValue.value = null;\n                this.cdr.detectChanges();\n            }\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public get selectedField(): FieldType | null {\n        return this._selectedField;\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public get isContextMenuVisible(): boolean {\n        return !this.groupContextMenuDropDown.collapsed;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public get hasEditedExpression(): boolean {\n        return this._editedExpression !== undefined && this._editedExpression !== null;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public addCondition(parent: ExpressionGroupItem, afterExpression?: ExpressionOperandItem, isUIInteraction?: boolean) {\n        this.cancelOperandAdd();\n\n        const operandItem = new ExpressionOperandItem({\n            fieldName: null!,\n            condition: null,\n            conditionName: null,\n            ignoreCase: true,\n            searchVal: null\n        }, parent);\n\n        const groupItem = new ExpressionGroupItem(this.getOperator(null) ?? FilteringLogic.And, parent);\n        this.contextualGroup = groupItem;\n        this.initialOperator = null!;\n\n        this._lastFocusedChipIndex = this._lastFocusedChipIndex === undefined ? -1 : this._lastFocusedChipIndex;\n\n        if (parent) {\n            if (afterExpression) {\n                const index = parent.children.indexOf(afterExpression);\n                parent.children.splice(index + 1, 0, operandItem);\n            } else {\n                parent.children.push(operandItem);\n            }\n            this._lastFocusedChipIndex++;\n        } else {\n            this.rootGroup = groupItem;\n            operandItem.parent = groupItem;\n            this.rootGroup.children.push(operandItem);\n            this._lastFocusedChipIndex = 0;\n        }\n\n        this._focusDelay = 250;\n\n        if (isUIInteraction && !afterExpression) {\n            this._lastFocusedChipIndex = this.expressionsChips.length;\n            this._focusDelay = DEFAULT_CHIP_FOCUS_DELAY;\n        }\n\n        this.enterExpressionEdit(operandItem);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public addReverseGroup(parent?: ExpressionGroupItem, afterExpression?: ExpressionItem) {\n        parent = parent ?? this.rootGroup;\n\n        if (parent.operator === FilteringLogic.And) {\n            this.addGroup(FilteringLogic.Or, parent, afterExpression);\n        } else {\n            this.addGroup(FilteringLogic.And, parent, afterExpression);\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public commitExpression() {\n        this.commitOperandEdit();\n        this.focusEditedExpressionChip();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public discardExpression(expressionItem?: ExpressionOperandItem) {\n        this.cancelOperandEdit();\n        if (expressionItem && expressionItem.expression.fieldName) {\n            this.focusEditedExpressionChip();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public commitOperandEdit() {\n        const actualSearchValue = this.searchValue.value;\n        if (this._editedExpression) {\n            // An expression can only be committed while a field is selected.\n            const selectedField = this.selectedField!;\n            this._editedExpression.expression.fieldName = selectedField.field;\n            this._editedExpression.expression.condition = selectedField.filters!.condition(this.selectedCondition);\n            this._editedExpression.expression.conditionName = this.selectedCondition;\n            this._editedExpression.expression.searchVal = DataUtil.parseValue(selectedField.dataType, actualSearchValue) || actualSearchValue;\n            this._editedExpression.fieldLabel = selectedField.label\n                ? selectedField.label\n                : selectedField.header\n                    ? selectedField.header\n                    : selectedField.field;\n\n            const innerQuery = this.innerQueries.filter(q => q.isInEditMode())[0]\n            if (innerQuery && this.selectedField?.filters?.condition(this.selectedCondition)?.isNestedQuery) {\n                innerQuery.exitEditAddMode();\n                this._editedExpression.expression.searchTree = this.getExpressionTreeCopy(innerQuery.expressionTree);\n                const returnFields = innerQuery.selectedReturnFields.length > 0 ?\n                                        innerQuery.selectedReturnFields :\n                                        [innerQuery.fields[0].field];\n                this._editedExpression.expression.searchTree.returnFields = returnFields;\n            } else {\n                this._editedExpression.expression.searchTree = null;\n            }\n            this.innerQueryNewExpressionTree = null!;\n\n            if (selectedField.filters!.condition(this.selectedCondition)?.isUnary || selectedField.filters!.condition(this.selectedCondition)?.isNestedQuery) {\n                this._editedExpression.expression.searchVal = null;\n            }\n\n            this._editedExpression.inEditMode = false;\n            this._editedExpression = null!;\n        }\n\n        if (this.selectedReturnFields.length === 0) {\n            this.selectedReturnFields = this.fields.map(f => f.field);\n        }\n\n        this._expressionTree = this.createExpressionTreeFromGroupItem(this.rootGroup, this.selectedEntity?.name, this.selectedReturnFields);\n        if (!this.parentExpression) {\n            this.expressionTreeChange.emit(this._expressionTree);\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public cancelOperandAdd() {\n        if (this._addModeExpression) {\n            this._addModeExpression.inAddMode = false;\n            this._addModeExpression = null!;\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public deleteItem = (expressionItem: ExpressionItem, skipEmit: boolean = false) => {\n        if (!expressionItem.parent) {\n            this.rootGroup = null!;\n            this.currentGroup = null!;\n            //this._expressionTree = null;\n            return;\n        }\n\n        if (expressionItem === this.currentGroup) {\n            this.currentGroup = this.currentGroup.parent;\n        }\n\n        const children = expressionItem.parent.children;\n        const index = children.indexOf(expressionItem);\n        children.splice(index, 1);\n        const entity = this.expressionTree ? this.expressionTree.entity : null;\n        const returnFields = this.expressionTree ? this.expressionTree.returnFields : null;\n        this._expressionTree = this.createExpressionTreeFromGroupItem(this.rootGroup, entity!, returnFields!); // TODO: don't recreate if not necessary\n\n        if (!children.length) {\n            this.deleteItem(expressionItem.parent, true);\n        }\n\n        if (!this.parentExpression && !skipEmit) {\n            this.expressionTreeChange.emit(this._expressionTree);\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public cancelOperandEdit() {\n        if (this.innerQueries) {\n            const innerQuery = this.innerQueries.filter(q => q.isInEditMode())[0];\n            if (innerQuery) {\n                if (innerQuery._editedExpression) {\n                    innerQuery.cancelOperandEdit();\n                }\n\n                innerQuery.expressionTree = this.getExpressionTreeCopy(this._editedExpression.expression.searchTree!);\n                this.innerQueryNewExpressionTree = null!;\n            }\n        }\n\n        if (this._editedExpression) {\n            this._editedExpression.inEditMode = false;\n\n            if (!this._editedExpression.expression.fieldName) {\n                this.deleteItem(this._editedExpression);\n            }\n\n            this._editedExpression = null!;\n        }\n\n        if (!this.expressionTree && this.contextualGroup) {\n            this.initialOperator = this.contextualGroup.operator;\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public operandCanBeCommitted(): boolean {\n        const innerQuery = this.innerQueries.filter(q => q.isInEditMode())[0];\n        return !!(this.selectedField && this.selectedCondition &&\n            (\n                (\n                    ((!Array.isArray(this.searchValue.value) && !!this.searchValue.value) || (Array.isArray(this.searchValue.value) && this.searchValue.value.length !== 0)) &&\n                    !(this.selectedField?.filters?.condition(this.selectedCondition)?.isNestedQuery)\n                ) ||\n                (\n                    this.selectedField?.filters?.condition(this.selectedCondition)?.isNestedQuery && innerQuery && !!innerQuery.expressionTree && innerQuery.selectedReturnFields?.length > 0\n                ) ||\n                this.selectedField.filters!.condition(this.selectedCondition)?.isUnary\n            ));\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public canCommitCurrentState(): boolean {\n        const innerQuery = this.innerQueries.filter(q => q.isInEditMode())[0];\n        if (innerQuery) {\n            return this.selectedReturnFields?.length > 0 && innerQuery.canCommitCurrentState();\n        } else {\n            return this.selectedReturnFields?.length > 0 &&\n                (\n                    (!this._editedExpression) || // no edited expr\n                    (this._editedExpression && !this.selectedField) || // empty edited expr\n                    (this._editedExpression && this.operandCanBeCommitted() === true) // valid edited expr\n                );\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public commitCurrentState(): void {\n        const innerQuery = this.innerQueries.filter(q => q.isInEditMode())[0];\n        if (innerQuery) {\n            innerQuery.commitCurrentState();\n        }\n\n        if (this._editedExpression) {\n            if (this.selectedField) {\n                this.commitOperandEdit();\n            } else {\n                this.deleteItem(this._editedExpression);\n                this._editedExpression = null!;\n            }\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public exitEditAddMode(shouldPreventInit = false) {\n        if (!this._editedExpression) {\n            return;\n        }\n\n        this.exitOperandEdit();\n        this.cancelOperandAdd();\n\n        if (shouldPreventInit) {\n            this._preventInit = true;\n        }\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public exitOperandEdit() {\n        if (!this._editedExpression) {\n            return;\n        }\n\n        if (this.operandCanBeCommitted()) {\n            this.commitOperandEdit();\n        } else {\n            this.cancelOperandEdit();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public isExpressionGroup(expression: ExpressionItem): boolean {\n        return expression instanceof ExpressionGroupItem;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onExpressionFocus(expressionItem: ExpressionOperandItem) {\n        if (this.prevFocusedExpression) {\n            this.prevFocusedExpression.focused = false;\n        }\n        expressionItem.focused = true;\n        this.prevFocusedExpression = expressionItem;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onExpressionBlur(event: FocusEvent, expressionItem: ExpressionOperandItem) {\n        if (this._prevFocusedContainer && this._prevFocusedContainer !== (event.target as HTMLElement).closest('.igx-filter-tree__expression-item')) {\n            expressionItem.focused = false;\n        }\n        this._prevFocusedContainer = (event.target as HTMLElement).closest('.igx-filter-tree__expression-item');\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onChipRemove(expressionItem: ExpressionItem) {\n        this.exitEditAddMode();\n        this.deleteItem(expressionItem);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public focusChipAfterDrag = (index: number) => {\n        this._lastFocusedChipIndex = index;\n        this.focusEditedExpressionChip();\n    }\n    /**\n     * @hidden @internal\n     */\n    public addExpressionBlur() {\n        if (this.prevFocusedExpression) {\n            this.prevFocusedExpression.focused = false;\n        }\n        if (this.addExpressionItemDropDown && !this.addExpressionItemDropDown.collapsed) {\n            this.addExpressionItemDropDown.close();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onChipClick(expressionItem: ExpressionOperandItem, chip: IgxChipComponent) {\n        this.enterExpressionEdit(expressionItem, chip);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public enterExpressionEdit(expressionItem: ExpressionOperandItem, chip?: IgxChipComponent) {\n        this.exitEditAddMode(true);\n        this.cdr.detectChanges();\n        this._lastFocusedChipIndex = chip ? this.expressionsChips.toArray().findIndex(expr => expr === chip) : this._lastFocusedChipIndex;\n        this.enterEditMode(expressionItem);\n    }\n\n\n    /**\n     * @hidden @internal\n     */\n    public clickExpressionAdd(targetButton: HTMLElement, chip: IgxChipComponent) {\n        this.exitEditAddMode(true);\n        this.cdr.detectChanges();\n        this._lastFocusedChipIndex = this.expressionsChips.toArray().findIndex(expr => expr === chip);\n        this.openExpressionAddDialog(targetButton);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public openExpressionAddDialog(targetButton: HTMLElement) {\n        this.addExpressionDropDownOverlaySettings.target = targetButton;\n        this.addExpressionDropDownOverlaySettings.positionStrategy = new ConnectedPositioningStrategy({\n            horizontalDirection: HorizontalAlignment.Right,\n            horizontalStartPoint: HorizontalAlignment.Left,\n            verticalStartPoint: VerticalAlignment.Bottom\n        });\n\n        this.addExpressionItemDropDown.open(this.addExpressionDropDownOverlaySettings);\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public enterExpressionAdd(event: ISelectionEventArgs, expressionItem: ExpressionOperandItem) {\n        if (this._addModeExpression) {\n            this._addModeExpression.inAddMode = false;\n        }\n\n        if (this.parentExpression) {\n            this.inEditModeChange.emit(this.parentExpression);\n        }\n\n        const parent = expressionItem.parent ?? this.rootGroup;\n        requestAnimationFrame(() => {\n            if (event.newSelection.value === 'addCondition') {\n                this.addCondition(parent, expressionItem);\n            } else if (event.newSelection.value === 'addGroup') {\n                this.addReverseGroup(parent, expressionItem);\n            }\n            expressionItem.inAddMode = true;\n            this._addModeExpression = expressionItem;\n        })\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public enterEditMode(expressionItem: ExpressionOperandItem) {\n        if (this._editedExpression) {\n            this._editedExpression.inEditMode = false;\n        }\n\n        if (this.parentExpression) {\n            this.inEditModeChange.emit(this.parentExpression);\n        }\n\n        expressionItem.hovered = false;\n        this.fields = this.selectedEntity ? this.selectedEntity.fields : null!;\n        this.selectedField =\n            expressionItem.expression.fieldName ?\n                this.fields?.find(field => field.field === expressionItem.expression.fieldName)!\n                : null!;\n        this.selectedCondition =\n            expressionItem.expression.condition ?\n                expressionItem.expression.condition.name :\n                null!;\n        this.searchValue.value = expressionItem.expression.searchVal instanceof Set ?\n            Array.from(expressionItem.expression.searchVal) :\n            expressionItem.expression.searchVal;\n\n        expressionItem.inEditMode = true;\n        this._editedExpression = expressionItem;\n        this.cdr.detectChanges();\n\n        this.entitySelectOverlaySettings.target = this.entitySelect.getEditElement();\n        this.entitySelectOverlaySettings.excludeFromOutsideClick = [this.entitySelect.getEditElement() as HTMLElement];\n        this.entitySelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n\n        if (this.returnFieldSelect) {\n            this.returnFieldSelectOverlaySettings.target = this.returnFieldSelect.getEditElement();\n            this.returnFieldSelectOverlaySettings.excludeFromOutsideClick = [this.returnFieldSelect.getEditElement() as HTMLElement];\n            this.returnFieldSelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n        }\n        if (this.fieldSelect) {\n            this.fieldSelectOverlaySettings.target = this.fieldSelect.getEditElement();\n            this.fieldSelectOverlaySettings.excludeFromOutsideClick = [this.fieldSelect.getEditElement() as HTMLElement];\n            this.fieldSelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n        }\n        if (this.conditionSelect) {\n            this.conditionSelectOverlaySettings.target = this.conditionSelect.getEditElement();\n            this.conditionSelectOverlaySettings.excludeFromOutsideClick = [this.conditionSelect.getEditElement() as HTMLElement];\n            this.conditionSelectOverlaySettings.positionStrategy = new AutoPositionStrategy();\n        }\n\n        if (!this.selectedField) {\n            this.fieldSelect.input.nativeElement.focus();\n        } else if (this.selectedField.filters!.condition(this.selectedCondition)?.isUnary) {\n            this.conditionSelect?.input.nativeElement.focus();\n        } else {\n            const input = this.searchValueInput?.nativeElement || this.picker?.getEditElement();\n            input?.focus();\n        }\n\n        (this.editingInputs?.nativeElement.parentElement as HTMLElement)?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onConditionSelectChanging(event: ISelectionEventArgs) {\n        event.cancel = true;\n        this.selectedCondition = event.newSelection.value;\n        this.conditionSelect.close();\n        this.cdr.detectChanges();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onGroupClick(groupContextMenuDropDown: any, targetButton: HTMLButtonElement, groupItem: ExpressionGroupItem) {\n        this.exitEditAddMode();\n        this.cdr.detectChanges();\n\n        this.groupContextMenuDropDown = groupContextMenuDropDown;\n        this.groupContextMenuDropDownOverlaySettings.target = targetButton;\n        this.groupContextMenuDropDownOverlaySettings.positionStrategy = new ConnectedPositioningStrategy({\n            horizontalDirection: HorizontalAlignment.Right,\n            horizontalStartPoint: HorizontalAlignment.Left,\n            verticalStartPoint: VerticalAlignment.Bottom\n        });\n\n        if (groupContextMenuDropDown.collapsed) {\n            this.contextualGroup = groupItem;\n            groupContextMenuDropDown.open(this.groupContextMenuDropDownOverlaySettings);\n        } else {\n            groupContextMenuDropDown.close();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getOperator(expressionItem: any) {\n        // if (!expressionItem && !this.expressionTree && !this.initialOperator) {\n        //     this.initialOperator = 0;\n        // }\n\n        const operator = expressionItem ?\n            expressionItem.operator :\n            this.expressionTree ?\n                this.expressionTree.operator :\n                this.initialOperator;\n        return operator;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getSwitchGroupText(expressionItem: any) {\n        const operator = this.getOperator(expressionItem);\n        const condition = operator === FilteringLogic.Or ? this.resourceStrings.igx_query_builder_and_label : this.resourceStrings.igx_query_builder_or_label\n        return this.resourceStrings.igx_query_builder_switch_group!.replace('{0}', condition!.toUpperCase());\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public onGroupContextMenuDropDownSelectionChanging(event: ISelectionEventArgs) {\n        event.cancel = true;\n\n        if (event.newSelection.value === 'switchCondition') {\n            const newOperator = (!this.expressionTree ? this.initialOperator : (this.contextualGroup ?? this._expressionTree).operator) === 0 ? 1 : 0;\n            this.selectFilteringLogic(newOperator);\n        } else if (event.newSelection.value === 'ungroup') {\n            this.ungroup();\n        }\n\n        this.groupContextMenuDropDown.close();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public ungroup() {\n        const selectedGroup = this.contextualGroup;\n        const parent = selectedGroup.parent;\n        if (parent) {\n            const index = parent.children.indexOf(selectedGroup);\n            parent.children.splice(index, 1, ...selectedGroup.children);\n\n            for (const expr of selectedGroup.children) {\n                expr.parent = parent;\n            }\n        }\n        this.commitOperandEdit();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public selectFilteringLogic(index: number) {\n        if (!this.expressionTree) {\n            this.initialOperator = index;\n            return;\n        }\n\n        if (this.contextualGroup) {\n            this.contextualGroup.operator = index as FilteringLogic;\n            this.commitOperandEdit();\n        } else if (this.expressionTree) {\n            this._expressionTree.operator = index as FilteringLogic;\n        }\n\n        this.initialOperator = null!;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getConditionFriendlyName(name: string): string {\n        // As we have an 'In' condition already used in ESF to search in a Set, we add the 'Query' suffix to the newly introduced nested query condition names.\n        // So instead of in/notIn we end up with 'inQuery'/'notInQuery', hence removing the suffix from the friendly name.\n        return (this.resourceStrings as any)[`igx_query_builder_filter_${name?.replace('Query', '')}`] || name;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public isDate(value: any) {\n        return value instanceof Date;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public invokeClick(eventArgs: KeyboardEvent) {\n        if (!this.dragService.dropGhostExpression && this.platform.isActivationKey(eventArgs)) {\n            eventArgs.preventDefault();\n            (eventArgs.currentTarget as HTMLElement).click();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public openPicker(args: KeyboardEvent) {\n        if (this.platform.isActivationKey(args)) {\n            args.preventDefault();\n            this.picker.open();\n        }\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getConditionList(): string[] {\n        if (!this.selectedField) return [];\n\n        if (!this.selectedField.filters) {\n            this.selectedField.filters = this.getFilters(this.selectedField);\n        }\n\n        if ((this.isAdvancedFiltering() && !this.entities![0].childEntities) ||\n            (this.isHierarchicalNestedQuery() && this.selectedEntity.name && !this.selectedEntity.childEntities)) {\n            return this.selectedField.filters.conditionList();\n        }\n\n        return this.selectedField.filters.extendedConditionList();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getFormatter(field: string) {\n        return this.fields?.find(el => el.field === field)?.formatter;\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public getFormat(field: string) {\n        return this.fields?.find(el => el.field === field)?.pipeArgs?.format ?? DEFAULT_PIPE_DATE_FORMAT;\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public setAddButtonFocus() {\n        this.addConditionButton?.nativeElement.focus();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public context(expression: ExpressionItem, afterExpression?: ExpressionItem) {\n        return {\n            $implicit: expression,\n            afterExpression\n        };\n    }\n\n    public formatReturnFields(innerTree: IFilteringExpressionsTree) {\n        const returnFields = innerTree.returnFields;\n        let text = returnFields!.join(', ');\n        const innerTreeEntity = this.entities?.find(el => el.name === innerTree.entity);\n        if (returnFields!.length === innerTreeEntity?.fields.length) {\n            text = this.resourceStrings.igx_query_builder_all_fields!;\n        } else {\n            text = returnFields!.join(', ');\n            text = text.length > 25 ? text.substring(0, 25) + ' ...' : text;\n        }\n        return text;\n    }\n\n    public isInEditMode(): boolean {\n        return !this.parentExpression || (this.parentExpression && this.parentExpression.inEditMode);\n    }\n\n    public onInEditModeChanged(expressionItem: ExpressionOperandItem) {\n        if (!expressionItem.inEditMode) {\n            this.enterExpressionEdit(expressionItem);\n        }\n    }\n\n    public getExpressionTreeCopy(expressionTree: IExpressionTree, shouldAssignInnerQueryExprTree?: boolean): IExpressionTree {\n        if (!expressionTree) {\n            return null!;\n        }\n\n        const exprTreeCopy = new FilteringExpressionsTree(expressionTree.operator, expressionTree.fieldName!, expressionTree.entity!, expressionTree.returnFields!);\n        exprTreeCopy.filteringOperands = [];\n\n        expressionTree.filteringOperands.forEach(o => isTree(o) ? exprTreeCopy.filteringOperands.push(this.getExpressionTreeCopy(o)) : exprTreeCopy.filteringOperands.push(o));\n\n        if (!this.innerQueryNewExpressionTree && shouldAssignInnerQueryExprTree) {\n            this.innerQueryNewExpressionTree = exprTreeCopy;\n        }\n\n        return exprTreeCopy;\n    }\n\n    public onSelectAllClicked() {\n        if (\n            (this._selectedReturnFields.length > 0 && this._selectedReturnFields.length < this._selectedEntity.fields.length) ||\n            this._selectedReturnFields.length == this._selectedEntity.fields.length\n        ) {\n            this.returnFieldsCombo.deselectAllItems();\n        } else {\n            this.returnFieldsCombo.selectAllItems();\n        }\n    }\n\n    public onReturnFieldSelectChanging(event: IComboSelectionChangingEventArgs | ISelectionEventArgs) {\n        let newSelection = [];\n        if (Array.isArray(event.newSelection)) {\n            newSelection = event.newSelection.map(item => item.field)\n        } else {\n            newSelection.push(event.newSelection.value);\n            this._selectedReturnFields = newSelection;\n        }\n\n        this.initExpressionTree(this.selectedEntity.name, newSelection);\n    }\n\n    public initExpressionTree(selectedEntityName: string, selectedReturnFields: string[]) {\n        if (!this._expressionTree) {\n            this._expressionTree = this.createExpressionTreeFromGroupItem(new ExpressionGroupItem(FilteringLogic.And, this.rootGroup), selectedEntityName, selectedReturnFields);\n        }\n\n        if (!this.parentExpression) {\n            this.expressionTreeChange.emit(this._expressionTree);\n        }\n    }\n\n    public getSearchValueTemplateContext(defaultSearchValueTemplate: TemplateRef<any>): IgxQueryBuilderSearchValueContext {\n        const ctx = {\n            $implicit: this.searchValue,\n            // The search value editor is only rendered while a field is selected.\n            selectedField: this.selectedField!,\n            selectedCondition: this.selectedCondition,\n            defaultSearchValueTemplate: defaultSearchValueTemplate\n        };\n        return ctx;\n    }\n\n    private getPipeArgs(field: FieldType) {\n        let pipeArgs = {...field.pipeArgs};\n        if (!pipeArgs) {\n            pipeArgs = { digitsInfo: DEFAULT_PIPE_DIGITS_INFO };\n        }\n\n        if (!pipeArgs.format) {\n            pipeArgs.format = field.dataType === GridColumnDataType.Time ?\n                DEFAULT_PIPE_TIME_FORMAT : field.dataType === GridColumnDataType.DateTime ?\n                    DEFAULT_PIPE_DATE_TIME_FORMAT : DEFAULT_PIPE_DATE_FORMAT;\n        }\n\n        return pipeArgs;\n    }\n\n    private selectDefaultCondition() {\n        if (this.selectedField && this.selectedField.filters) {\n            this.selectedCondition = this.selectedField.filters.conditionList().indexOf('equals') >= 0 ? 'equals' : this.selectedField.filters.conditionList()[0];\n        }\n    }\n\n    private getFilters(field: FieldType) {\n        if (!field.filters) {\n            switch (field.dataType) {\n                case GridColumnDataType.Boolean:\n                    return IgxBooleanFilteringOperand.instance();\n                case GridColumnDataType.Number:\n                case GridColumnDataType.Currency:\n                case GridColumnDataType.Percent:\n                    return IgxNumberFilteringOperand.instance();\n                case GridColumnDataType.Date:\n                    return IgxDateFilteringOperand.instance();\n                case GridColumnDataType.Time:\n                    return IgxTimeFilteringOperand.instance();\n                case GridColumnDataType.DateTime:\n                    return IgxDateTimeFilteringOperand.instance();\n                case GridColumnDataType.String:\n                default:\n                    return IgxStringFilteringOperand.instance();\n            }\n        } else {\n            return field.filters;\n        }\n    }\n\n\n    private addGroup(operator: FilteringLogic, parent?: ExpressionGroupItem, afterExpression?: ExpressionItem) {\n        this.cancelOperandAdd();\n\n        const groupItem = new ExpressionGroupItem(operator, parent);\n\n        if (parent) {\n            if (afterExpression) {\n                const index = parent.children.indexOf(afterExpression);\n                parent.children.splice(index + 1, 0, groupItem);\n            } else {\n                parent.children.push(groupItem);\n            }\n        } else {\n            this.rootGroup = groupItem;\n        }\n\n        this.addCondition(groupItem);\n        this.currentGroup = groupItem;\n    }\n\n    private createExpressionGroupItem(expressionTree: IExpressionTree, parent?: ExpressionGroupItem, entityName?: string): ExpressionGroupItem {\n        let groupItem!: ExpressionGroupItem;\n        if (expressionTree) {\n            groupItem = new ExpressionGroupItem(expressionTree.operator, parent);\n            if (!expressionTree.filteringOperands) {\n                return groupItem;\n            }\n\n            for (let i = 0; i < expressionTree.filteringOperands.length; i++) {\n                const expr = expressionTree.filteringOperands[i];\n\n                if (isTree(expr)) {\n                    groupItem.children.push(this.createExpressionGroupItem(expr, groupItem, expressionTree.entity!));\n                } else {\n                    const filteringExpr = expr as IFilteringExpression;\n                    const exprCopy: IFilteringExpression = {\n                        fieldName: filteringExpr.fieldName,\n                        condition: filteringExpr.condition,\n                        conditionName: filteringExpr.condition?.name || filteringExpr.conditionName,\n                        searchVal: filteringExpr.searchVal,\n                        searchTree: filteringExpr.searchTree,\n                        ignoreCase: filteringExpr.ignoreCase\n                    };\n                    const operandItem = new ExpressionOperandItem(exprCopy, groupItem);\n                    const field = this.fields?.find(el => el.field === filteringExpr.fieldName);\n                    operandItem.fieldLabel = field?.label || field?.header || field?.field!;\n                    groupItem.children.push(operandItem);\n                }\n            }\n\n\n            if (expressionTree.entity) {\n                entityName = expressionTree.entity;\n            }\n            const entity = this.entities?.find(el => el.name === entityName);\n            if (entity) {\n                this.fields = entity.fields;\n            }\n\n            this._selectedEntity = this.entities?.find(el => el.name === entityName)!;\n            this._selectedReturnFields =\n                !expressionTree.returnFields || expressionTree.returnFields.includes('*') || expressionTree.returnFields.includes('All') || expressionTree.returnFields.length === 0\n                    ? this.fields?.map(f => f.field)\n                    : this.fields?.filter(f => expressionTree.returnFields!.indexOf(f.field) >= 0).map(f => f.field);\n        }\n        return groupItem;\n    }\n\n    private createExpressionTreeFromGroupItem(groupItem: ExpressionGroupItem, entity?: string, returnFields?: string[]): FilteringExpressionsTree {\n        if (!groupItem) {\n            return null!;\n        }\n\n        const expressionTree = new FilteringExpressionsTree(groupItem.operator, undefined, entity, returnFields);\n\n        for (let i = 0; i < groupItem.children.length; i++) {\n            const item = groupItem.children[i];\n\n            if (item instanceof ExpressionGroupItem) {\n                const subTree = this.createExpressionTreeFromGroupItem((item as ExpressionGroupItem), entity, returnFields);\n                expressionTree.filteringOperands.push(subTree);\n            } else {\n                expressionTree.filteringOperands.push((item as ExpressionOperandItem).expression);\n            }\n        }\n\n        return expressionTree;\n    }\n\n    private scrollElementIntoView(target: HTMLElement) {\n        const container = this.expressionsContainer.nativeElement;\n        const targetOffset = target.offsetTop - container.offsetTop;\n        const delta = 10;\n\n        if (container.scrollTop + delta > targetOffset) {\n            container.scrollTop = targetOffset - delta;\n        } else if (container.scrollTop + container.clientHeight < targetOffset + target.offsetHeight + delta) {\n            container.scrollTop = targetOffset + target.offsetHeight + delta - container.clientHeight;\n        }\n    }\n\n    private focusEditedExpressionChip() {\n        if (this._timeoutId) {\n            clearTimeout(this._timeoutId);\n        }\n\n        this._timeoutId = setTimeout(() => {\n            if (this._lastFocusedChipIndex != -1) {\n                //Sort the expression chip list.\n                //If there was a recent drag&drop and the tree hasn't rerendered(child query), they will be unordered\n                const sortedChips = this.expressionsChips.toArray().sort(function (a, b) {\n                    if (a === b) return 0;\n                    if (a.chipArea.nativeElement.compareDocumentPosition(b.chipArea.nativeElement) & 2) {\n                        // b comes before a\n                        return 1;\n                    }\n                    return -1;\n                });\n                const chipElement = sortedChips[this._lastFocusedChipIndex]?.nativeElement;\n                if (chipElement) {\n                    chipElement.focus();\n                }\n                this._lastFocusedChipIndex = -1;\n                this._focusDelay = DEFAULT_CHIP_FOCUS_DELAY;\n            }\n        }, this._focusDelay);\n    }\n\n    private init() {\n        this.cancelOperandAdd();\n        this.cancelOperandEdit();\n\n        // Ignore values of certain properties for the comparison\n        const propsToIgnore = ['parent', 'hovered', 'ignoreCase', 'inEditMode', 'inAddMode'];\n        const propsReplacer = function replacer(key: string, value: any) {\n            if (propsToIgnore.indexOf(key) >= 0) {\n                return undefined;\n            } else {\n                return value;\n            }\n        };\n\n        // Skip root being recreated if the same\n        const newRootGroup = this.createExpressionGroupItem(this.expressionTree);\n        if (JSON.stringify(this.rootGroup, propsReplacer) !== JSON.stringify(newRootGroup, propsReplacer)) {\n            this.rootGroup = this.createExpressionGroupItem(this.expressionTree);\n            this.currentGroup = this.rootGroup;\n        }\n\n        if (this.rootGroup?.children?.length == 0) {\n            this.rootGroup = null!;\n            this.currentGroup = null!;\n        }\n    }\n\n    private initLocale() {\n        this._defaultLocale = getCurrentI18n();\n        this._locale = this._localeId !== DEFAULT_LOCALE ? this._localeId : this._locale;\n        onResourceChangeHandle(this.destroy$, this.onResourceChange as any, this);\n    }\n\n    private onResourceChange(args: CustomEvent<IResourceChangeEventArgs>) {\n        this._defaultLocale = args.detail.newLocale;\n        if (!this._locale) {\n            // Avoid unnecessary fetch of resources, since they should be already retrieved when setting custom locale.\n            this.updateResources();\n        }\n    }\n\n    private updateResources(locale?: string) {\n        this._defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN, false, locale);\n        this._customResourceStrings = this._resourceStrings ? Object.assign({}, this._defaultResourceStrings, this._resourceStrings) : null!;\n    }\n\n    /** rootGroup is recreated after clicking Apply, which sets new expressionTree and calls init()*/\n    protected trackExpressionItem = trackByIdentity;\n}\n","<ng-template #addIcon>\n  <igx-icon family=\"default\" name=\"add\"></igx-icon>\n</ng-template>\n\n<ng-template #closeIcon>\n  <igx-icon family=\"default\" name=\"close\"></igx-icon>\n</ng-template>\n\n<ng-template #selectFromTemplate>\n  <div\n    class=\"igx-filter-tree__inputs\"\n    [style.display]=\"\n      isInEditMode() &&\n      (!this.isAdvancedFiltering() || this.isHierarchicalNestedQuery())\n        ? 'flex'\n        : 'none'\n    \"\n  >\n    <div class=\"igx-filter-tree__inputs-field\">\n      <span class=\"igx-query-builder__label\">{{\n        this.resourceStrings.igx_query_builder_from_label\n      }}</span>\n      <igx-select\n        #entitySelect\n        type=\"box\"\n        (selectionChanging)=\"onEntitySelectChanging($event)\"\n        (opening)=\"exitEditAddMode(true)\"\n        [overlaySettings]=\"entitySelectOverlaySettings\"\n        [ngModel]=\"selectedEntity\"\n        [style.display]=\"isInEditMode() ? 'block' : 'none'\"\n        [placeholder]=\"this.resourceStrings.igx_query_builder_select_entity!\"\n        [disabled]=\"disableEntityChange\"\n      >\n        @for (entity of entities; track entity.name) {\n          <igx-select-item [value]=\"entity\">\n            {{ entity.name }}\n          </igx-select-item>\n        }\n      </igx-select>\n    </div>\n\n    <div class=\"igx-filter-tree__inputs-field\">\n      @if (!this.isHierarchicalNestedQuery()) {\n        <span class=\"igx-query-builder__label\">{{\n          this.resourceStrings.igx_query_builder_select_label\n        }}</span>\n      }\n      @if (!parentExpression) {\n        <igx-combo\n          #returnFieldsCombo\n          [itemsMaxHeight]=\"250\"\n          [data]=\"fields\"\n          [displayKey]=\"'field'\"\n          [valueKey]=\"'field'\"\n          [disabled]=\"disableReturnFieldsChange\"\n          [(ngModel)]=\"selectedReturnFields\"\n          [overlaySettings]=\"returnFieldSelectOverlaySettings\"\n          [placeholder]=\"this.resourceStrings.igx_query_builder_select_return_fields!\"\n          [searchPlaceholder]=\"this.resourceStrings.igx_query_builder_search!\"\n          [style.display]=\"isInEditMode() ? 'block' : 'none'\"\n          (selectionChanging)=\"onReturnFieldSelectChanging($event)\"\n          (opening)=\"exitEditAddMode()\"\n        >\n          <ng-template igxComboHeader>\n            <div\n              class=\"igx-drop-down__item igx-drop-down__item--query-builder\"\n              (click)=\"onSelectAllClicked()\"\n              [ngClass]=\"{\n                'igx-drop-down__item--selected':\n                  this.selectedEntity &&\n                  this.selectedReturnFields &&\n                  this.selectedEntity.fields.length ===\n                    this.selectedReturnFields.length,\n              }\"\n            >\n              <igx-checkbox\n                [checked]=\"\n                  this.selectedEntity &&\n                  this.selectedReturnFields &&\n                  this.selectedEntity.fields.length ===\n                    this.selectedReturnFields.length\n                \"\n                [indeterminate]=\"\n                  this.selectedEntity &&\n                  this.selectedReturnFields &&\n                  this.selectedReturnFields.length > 0 &&\n                  this.selectedReturnFields.length < this.selectedEntity.fields.length\n                \"\n                [readonly]=\"true\"\n                [disableRipple]=\"true\"\n                [tabindex]=\"-1\"\n                class=\"igx-combo__checkbox\"\n              >\n              </igx-checkbox>\n              <div class=\"igx-drop-down__inner\">\n                {{ this.resourceStrings.igx_query_builder_select_all }}\n              </div>\n            </div>\n          </ng-template>\n        </igx-combo>\n      } @else {\n        <igx-select\n          #returnFieldSelect\n          type=\"box\"\n          (selectionChanging)=\"onReturnFieldSelectChanging($event)\"\n          [overlaySettings]=\"returnFieldSelectOverlaySettings\"\n          [disabled]=\"!selectedEntity\"\n          [ngModel]=\"selectedReturnFields ? selectedReturnFields[0] : null\"\n          [placeholder]=\"this.resourceStrings.igx_query_builder_select_return_field_single!\"\n          [style.display]=\"isInEditMode() ? 'block' : 'none'\"\n          (opening)=\"exitEditAddMode()\"\n        >\n          @for (field of fields; track field.field) {\n            <igx-select-item [value]=\"field.field\">\n              {{ field.field }}\n            </igx-select-item>\n          }\n        </igx-select>\n      }\n    </div>\n  </div>\n</ng-template>\n\n<div #expressionsContainer class=\"igx-query-builder__main\">\n  <ng-container *ngTemplateOutlet=\"selectFromTemplate\"></ng-container>\n\n  <ng-template\n    #addExpressionsTemplate\n    let-expressionItem\n    let-afterExpression=\"afterExpression\"\n  >\n    <button\n      type=\"button\"\n      #addConditionButton\n      igxButton=\"flat\"\n      [disabled]=\"hasEditedExpression\"\n      (click)=\"addCondition(expressionItem, afterExpression, true)\"\n      igxDrop\n      (enter)=\"\n        dragService.onAddConditionEnter(addConditionButton, expressionItem)\n      \"\n      (leave)=\"dragService.onChipLeave()\"\n    >\n      <ng-container *ngTemplateOutlet=\"addIcon\"></ng-container>\n      <span>{{\n        this.resourceStrings.igx_query_builder_add_condition_root\n      }}</span>\n    </button>\n\n    @if (this.rootGroup) {\n      <button\n        type=\"button\"\n        igxButton=\"flat\"\n        [disabled]=\"hasEditedExpression\"\n        (click)=\"addReverseGroup(expressionItem, afterExpression)\"\n      >\n        <ng-container *ngTemplateOutlet=\"addIcon\"></ng-container>\n        <span>{{ this.resourceStrings.igx_query_builder_add_group_root }}</span>\n      </button>\n    }\n  </ng-template>\n\n  <ng-template #operandTemplate let-expressionItem>\n    @if (!expressionItem.inEditMode) {\n      @if (\n        dragService.dropGhostExpression &&\n        expressionItem === dragService.dropGhostExpression &&\n        dragService.isKeyboardDrag === false\n      ) {\n        <div\n          class=\"igx-filter-tree__expression-item igx-filter-tree__expression-item-drop-ghost\"\n        >\n          <igx-chip [data]=\"expressionItem\">\n            {{ this.resourceStrings.igx_query_builder_drop_ghost_text }}\n          </igx-chip>\n        </div>\n      } @else {\n        <div\n          #dragRef\n          igxDrop\n          (enter)=\"dragService.onChipEnter(dragRef, expressionItem)\"\n          (over)=\"dragService.onDivOver(dragRef, expressionItem)\"\n          (leave)=\"dragService.onChipLeave()\"\n          (dropped)=\"dragService.onDivDropped(expressionItem)\"\n          [ngClass]=\"{\n            'igx-filter-tree__expression-item': true,\n            'igx-filter-tree__expression-item-keyboard-ghost':\n              expressionItem === dragService.dropGhostExpression,\n          }\"\n          (mouseenter)=\"expressionItem.hovered = true\"\n          (mouseleave)=\"expressionItem.hovered = false\"\n          (focusin)=\"onExpressionFocus(expressionItem)\"\n          (focusout)=\"onExpressionBlur($event, expressionItem)\"\n        >\n          <igx-chip\n            #expressionChip\n            [draggable]=\"true\"\n            [hideBaseOnDrag]=\"false\"\n            [animateOnRelease]=\"false\"\n            (moveStart)=\"\n              dragService.onMoveStart(\n                dragRef,\n                expressionItem,\n                false,\n                expressionChip\n              )\n            \"\n            (moveEnd)=\"dragService.onMoveEnd($event)\"\n            (dragEnter)=\"dragService.onChipEnter(dragRef, expressionItem)\"\n            (dragOver)=\"dragService.onChipOver(dragRef)\"\n            (dragLeave)=\"dragService.onChipLeave()\"\n            (dragDrop)=\"dragService.onChipDropped()\"\n            #target=\"tooltipTarget\"\n            [igxTooltipTarget]=\"tooltipRef\"\n            [data]=\"expressionItem\"\n            [removable]=\"isInEditMode() ? 'true' : 'false'\"\n            (keydown)=\"invokeClick($event)\"\n            (click)=\"onChipClick(expressionItem, expressionChip)\"\n            (remove)=\"onChipRemove(expressionItem)\"\n          >\n            <igx-icon\n              igxPrefix\n              class=\"igx-drag-indicator\"\n              tabindex=\"0\"\n              (focus)=\"\n                dragService.onChipDragIndicatorFocus(dragRef, expressionItem)\n              \"\n              (focusout)=\"dragService.onChipDragIndicatorFocusOut()\"\n              family=\"default\"\n              name=\"drag_indicator\"\n            >\n            </igx-icon>\n            <span igxPrefix class=\"igx-filter-tree__expression-column\">\n              {{\n                expressionItem.fieldLabel || expressionItem.expression.fieldName\n              }}\n            </span>\n            <span\n              igxPrefix\n              class=\"igx-filter-tree__expression-condition\"\n              [class.igx-filter-tree__expression-condition--unary]=\"\n                expressionItem.expression.condition?.isUnary\n              \"\n            >\n              {{\n                getConditionFriendlyName(\n                  $safeNavigationMigration(\n                    expressionItem.expression.condition?.name\n                  )\n                )\n              }}\n            </span>\n            @if (!expressionItem.expression.condition?.isUnary) {\n              <span>\n                @if (expressionItem.expression.searchTree) {\n                  <ng-container>\n                    <strong>{{\n                      expressionItem.expression.searchTree.entity\n                    }}</strong\n                    >&nbsp;/\n                    {{\n                      formatReturnFields(expressionItem.expression.searchTree)\n                    }}\n                  </ng-container>\n                } @else {\n                  <ng-container>\n                    @if (isDate(expressionItem.expression.searchVal)) {\n                      @if (getFormatter(expressionItem.expression.fieldName)) {\n                        {{\n                          expressionItem.expression.searchVal\n                            | fieldFormatter\n                              : $any(getFormatter(\n                                  expressionItem.expression.fieldName\n                                ))\n                              : undefined\n                        }}\n                      } @else {\n                        {{\n                          expressionItem.expression.searchVal\n                            | date\n                              : getFormat(expressionItem.expression.fieldName)\n                              : undefined\n                              : this.locale\n                        }}\n                      }\n                    } @else {\n                      @if (getFormatter(expressionItem.expression.fieldName)) {\n                        {{\n                          expressionItem.expression.searchVal\n                            | fieldFormatter\n                              : $any(getFormatter(\n                                  expressionItem.expression.fieldName\n                                ))\n                              : expressionItem.expression.conditionName ||\n                                  expressionItem.expression.condition?.name\n                        }}\n                      } @else {\n                        {{ expressionItem.expression.searchVal }}\n                      }\n                    }\n                  </ng-container>\n                }\n              </span>\n            }\n          </igx-chip>\n          <div #tooltipRef=\"tooltip\" igxTooltip>\n            @if (expressionItem.expression.searchTree) {\n              {{ expressionItem.expression.searchTree.returnFields.join(', ') }}\n            } @else if (expressionItem.expression.condition?.isUnary) {\n              {{\n                getConditionFriendlyName(\n                  $safeNavigationMigration(\n                    expressionItem.expression.condition?.name\n                  )\n                )\n              }}\n            } @else {\n              @if (getFormatter(expressionItem.expression.fieldName)) {\n                {{\n                  expressionItem.expression.searchVal\n                    | fieldFormatter\n                      : $any(getFormatter(expressionItem.expression.fieldName))\n                      : expressionItem.expression.conditionName ||\n                          expressionItem.expression.condition?.name\n                }}\n              } @else {\n                {{ expressionItem.expression.searchVal }}\n              }\n            }\n          </div>\n\n          @if (expressionItem.focused || expressionItem.hovered) {\n            <div igxDragIgnore class=\"igx-filter-tree__expression-actions\">\n              <button\n                #addExpressionButton\n                type=\"button\"\n                igxDragIgnore\n                igxIconButton=\"outlined\"\n                [igxDropDownItemNavigation]=\"addOptionsDropDown\"\n                aria-labelledby=\"add-expression\"\n                (keydown)=\"invokeClick($event)\"\n                (click)=\"\n                  clickExpressionAdd(addExpressionButton, expressionChip)\n                \"\n                (blur)=\"addExpressionBlur()\"\n              >\n                <igx-icon\n                  id=\"add-expression\"\n                  family=\"default\"\n                  name=\"add\"\n                ></igx-icon>\n              </button>\n              <igx-drop-down\n                #addOptionsDropDown\n                (selectionChanging)=\"enterExpressionAdd($event, expressionItem)\"\n              >\n                <igx-drop-down-item [value]=\"'addCondition'\">\n                  <span>{{\n                    this.resourceStrings.igx_query_builder_add_condition\n                  }}</span>\n                </igx-drop-down-item>\n                <igx-drop-down-item [value]=\"'addGroup'\">\n                  <span>{{\n                    this.resourceStrings.igx_query_builder_add_group\n                  }}</span>\n                </igx-drop-down-item>\n              </igx-drop-down>\n            </div>\n          }\n        </div>\n      }\n    }\n    <div #editingInputsContainer class=\"igx-filter-tree__subquery\">\n      @if (expressionItem.inEditMode) {\n        <div\n          #editingInputs\n          igxDrop\n          (enter)=\"\n            dragService.onChipEnter(editingInputsContainer, expressionItem)\n          \"\n          (over)=\"\n            dragService.onChipEnter(editingInputsContainer, expressionItem)\n          \"\n          (leave)=\"dragService.onChipLeave()\"\n          (dropped)=\"dragService.onDivDropped(expressionItem)\"\n          class=\"igx-filter-tree__inputs\"\n        >\n          <igx-select\n            #fieldSelect\n            type=\"box\"\n            [overlaySettings]=\"fieldSelectOverlaySettings\"\n            [(ngModel)]=\"selectedField\"\n            [disabled]=\"!fields\"\n            [placeholder]=\"this.resourceStrings.igx_query_builder_column_placeholder!\"\n          >\n            @for (field of fields; track field) {\n              <igx-select-item [value]=\"field\">\n                {{ field.label || field.header || field.field }}\n              </igx-select-item>\n            }\n          </igx-select>\n\n          <igx-select\n            #conditionSelect\n            type=\"box\"\n            [overlaySettings]=\"conditionSelectOverlaySettings\"\n            [(ngModel)]=\"selectedCondition\"\n            (selectionChanging)=\"onConditionSelectChanging($event)\"\n            [disabled]=\"!selectedField\"\n            [placeholder]=\"this.resourceStrings.igx_query_builder_condition_placeholder!\"\n          >\n            @if (\n              selectedField &&\n              conditionSelect.value &&\n              selectedField.filters!.condition(conditionSelect.value)\n            ) {\n              <igx-prefix>\n                <igx-icon\n                  family=\"default\"\n                  [name]=\"\n                    selectedField.filters!.condition(conditionSelect.value)\n                      .iconName\n                  \"\n                >\n                </igx-icon>\n              </igx-prefix>\n            }\n\n            @for (condition of getConditionList(); track condition) {\n              <igx-select-item\n                [value]=\"condition\"\n                [text]=\"getConditionFriendlyName(condition)\"\n              >\n                <div class=\"igx-grid__filtering-dropdown-items\">\n                  <igx-icon\n                    family=\"default\"\n                    [name]=\"selectedField!.filters!.condition(condition).iconName\"\n                  >\n                  </igx-icon>\n                  <span class=\"igx-grid__filtering-dropdown-text\">{{\n                    getConditionFriendlyName(condition)\n                  }}</span>\n                </div>\n              </igx-select-item>\n            }\n          </igx-select>\n\n          <ng-container\n            *ngTemplateOutlet=\"\n              searchValueTemplate\n                ? searchValueTemplate\n                : defaultSearchValueTemplate;\n              context: getSearchValueTemplateContext(defaultSearchValueTemplate)\n            \"\n          >\n          </ng-container>\n\n          <ng-template #defaultSearchValueTemplate>\n            @if (\n              !selectedField ||\n              (selectedField.dataType !== 'date' &&\n                selectedField.dataType !== 'time' &&\n                selectedField.dataType !== 'dateTime')\n            ) {\n              <igx-input-group type=\"box\">\n                <input\n                  #searchValueInput\n                  igxInput\n                  [disabled]=\"isSearchValueInputDisabled()\"\n                  [placeholder]=\"\n                    this.selectedCondition === 'inQuery' ||\n                    this.selectedCondition === 'notInQuery'\n                      ? this.resourceStrings\n                          .igx_query_builder_query_value_placeholder\n                      : this.resourceStrings.igx_query_builder_value_placeholder\n                  \"\n                  [type]=\"\n                    selectedField && selectedField.dataType === 'number'\n                      ? 'number'\n                      : 'text'\n                  \"\n                  [(ngModel)]=\"searchValue.value\"\n                />\n              </igx-input-group>\n            } @else if (selectedField && selectedField.dataType === 'date') {\n              <igx-date-picker\n                #picker\n                [(value)]=\"searchValue.value\"\n                (keydown)=\"openPicker($event)\"\n                (click)=\"picker.open()\"\n                type=\"box\"\n                [disabled]=\"isSearchValueInputDisabled()\"\n                [locale]=\"this.locale\"\n                [formatter]=\"selectedField.formatter!\"\n                [displayFormat]=\"selectedField.pipeArgs!.format!\"\n                [weekStart]=\"selectedField.pipeArgs!.weekStart!\"\n                [placeholder]=\"\n                  this.resourceStrings.igx_query_builder_date_placeholder\n                !\"\n              >\n                <!-- disable default icons -->\n                <igx-picker-toggle></igx-picker-toggle>\n                <igx-picker-clear></igx-picker-clear>\n              </igx-date-picker>\n            } @else if (selectedField && selectedField.dataType === 'time') {\n              <igx-time-picker\n                #picker\n                [(value)]=\"searchValue.value\"\n                (click)=\"picker.open()\"\n                (keydown)=\"openPicker($event)\"\n                type=\"box\"\n                [disabled]=\"isSearchValueInputDisabled()\"\n                [locale]=\"this.locale\"\n                [formatter]=\"selectedField.formatter!\"\n                [displayFormat]=\"selectedField.pipeArgs!.format!\"\n                [inputFormat]=\"selectedField.editorOptions?.dateTimeFormat!\"\n                [placeholder]=\"\n                  this.resourceStrings.igx_query_builder_time_placeholder\n                !\"\n              >\n                <!-- disable default icons -->\n                <igx-picker-toggle></igx-picker-toggle>\n                <igx-picker-clear></igx-picker-clear>\n              </igx-time-picker>\n            } @else if (\n              selectedField && selectedField.dataType === 'dateTime'\n            ) {\n              <igx-input-group #inputGroup type=\"box\">\n                <input\n                  #input\n                  igxInput\n                  tabindex=\"0\"\n                  [placeholder]=\"\n                    this.resourceStrings.igx_query_builder_datetime_placeholder\n                  \"\n                  [(ngModel)]=\"searchValue.value\"\n                  [disabled]=\"isSearchValueInputDisabled()\"\n                  [locale]=\"this.locale\"\n                  [igxDateTimeEditor]=\"selectedField.editorOptions?.dateTimeFormat!\"\n                  [defaultFormatType]=\"selectedField.dataType\"\n                  [displayFormat]=\"selectedField.pipeArgs!.format!\"\n                />\n              </igx-input-group>\n            }\n          </ng-template>\n\n          <div class=\"igx-filter-tree__inputs-actions\">\n            <button\n              type=\"button\"\n              igxIconButton=\"outlined\"\n              [disabled]=\"!operandCanBeCommitted()\"\n              (click)=\"commitExpression()\"\n            >\n              <igx-icon family=\"default\" name=\"confirm\"></igx-icon>\n            </button>\n            <button\n              type=\"button\"\n              igxIconButton=\"outlined\"\n              (click)=\"discardExpression(expressionItem)\"\n            >\n              <ng-container *ngTemplateOutlet=\"closeIcon\"></ng-container>\n            </button>\n          </div>\n        </div>\n      }\n\n      @if (\n        (!expressionItem.inEditMode &&\n          expressionItem.expression.searchTree &&\n          expressionItem.expression.searchTree.filteringOperands?.length > 0) ||\n        (expressionItem.inEditMode &&\n          selectedField?.filters?.condition(selectedCondition)?.isNestedQuery)\n      ) {\n        <ng-container>\n          <igx-query-builder-tree\n            [style.display]=\"\n              expressionItem.inEditMode || expressionItem.expanded\n                ? 'block'\n                : 'none'\n            \"\n            [entities]=\"\n              (this.selectedEntity\n                ? this.selectedEntity.childEntities\n                : entities?.[0]?.childEntities) ??\n              entities ?? []\n            \"\n            [queryBuilder]=\"this.queryBuilder\"\n            [parentExpression]=\"expressionItem\"\n            [expectedReturnField]=\"this.selectedField?.field\"\n            [expressionTree]=\"\n              expressionItem.inEditMode\n                ? (innerQueryNewExpressionTree ||\n                  getExpressionTreeCopy(\n                    expressionItem.expression.searchTree,\n                    true\n                  ))\n                : expressionItem.expression.searchTree\n            \"\n            (inEditModeChange)=\"onInEditModeChanged($event)\"\n            [searchValueTemplate]=\"searchValueTemplate\"\n            [resourceStrings]=\"resourceStrings\"\n          >\n          </igx-query-builder-tree>\n        </ng-container>\n      }\n    </div>\n  </ng-template>\n\n  <ng-template #expressionGroupTemplate let-expressionItem>\n    <div\n      class=\"igx-filter-tree\"\n      (focusout)=\"parentExpression ? null : dragService.onDragFocusOut()\"\n    >\n      <div\n        class=\"igx-filter-tree__line\"\n        [ngClass]=\"{\n          'igx-filter-tree__line--and': getOperator(expressionItem) === 0,\n          'igx-filter-tree__line--or': getOperator(expressionItem) === 1,\n        }\"\n      ></div>\n\n      <div class=\"igx-filter-tree__expressions\">\n        <div\n          class=\"igx-filter-tree__expression-context-menu\"\n          #groupRef\n          igxDrop\n          (enter)=\"dragService.onGroupRootOver(groupRef, expressionItem)\"\n          (over)=\"dragService.onGroupRootOver(groupRef, expressionItem)\"\n          (leave)=\"dragService.onChipLeave()\"\n        >\n          <button\n            #changeGroupButton\n            type=\"button\"\n            [ngClass]=\"{\n              'igx-filter-tree__button--and': getOperator(expressionItem) === 0,\n              'igx-filter-tree__button--or': getOperator(expressionItem) === 1,\n            }\"\n            [igxDropDownItemNavigation]=\"groupContextMenuDropDown\"\n            igxDragIgnore\n            igxButton=\"flat\"\n            aria-labelledby=\"change-group\"\n            (keydown)=\"invokeClick($event)\"\n            (click)=\"\n              onGroupClick(\n                groupContextMenuDropDown,\n                changeGroupButton,\n                expressionItem\n              )\n            \"\n          >\n            <span\n              igxDrop\n              (enter)=\"dragService.onGroupRootOver(groupRef, expressionItem)\"\n              (over)=\"dragService.onGroupRootOver(groupRef, expressionItem)\"\n              (leave)=\"dragService.onChipLeave()\"\n            >\n              {{\n                getOperator(expressionItem) === 0\n                  ? this.resourceStrings.igx_query_builder_and_label\n                  : this.resourceStrings.igx_query_builder_or_label\n              }}\n            </span>\n            <igx-icon\n              family=\"default\"\n              name=\"arrow_drop_down\"\n              role=\"button\"\n            ></igx-icon>\n          </button>\n          <igx-drop-down\n            #groupContextMenuDropDown\n            (selectionChanging)=\"\n              onGroupContextMenuDropDownSelectionChanging($event)\n            \"\n            [width]=\"'fit-content'\"\n          >\n            <igx-drop-down-item [value]=\"'switchCondition'\">\n              {{ getSwitchGroupText(expressionItem) }}\n            </igx-drop-down-item>\n            <igx-drop-down-item\n              [value]=\"'ungroup'\"\n              [disabled]=\"this.rootGroup === this.contextualGroup\"\n            >\n              {{ this.resourceStrings.igx_query_builder_ungroup }}\n            </igx-drop-down-item>\n          </igx-drop-down>\n        </div>\n        <div class=\"igx-filter-tree__expression-section\">\n          @for (\n            expr of expressionItem?.children;\n            track trackExpressionItem(expr)\n          ) {\n            <ng-container>\n              <ng-container\n                *ngTemplateOutlet=\"\n                  isExpressionGroup(expr)\n                    ? expressionGroupTemplate\n                    : operandTemplate;\n                  context: context(expr)\n                \"\n              >\n              </ng-container>\n            </ng-container>\n          }\n        </div>\n\n        @if (expressionItem === rootGroup && !hasEditedExpression) {\n          <div #currentGroupButtonsContainer class=\"igx-filter-tree__buttons\">\n            <ng-container\n              *ngTemplateOutlet=\"\n                addExpressionsTemplate;\n                context: context(expressionItem)\n              \"\n            >\n            </ng-container>\n          </div>\n        }\n      </div>\n    </div>\n  </ng-template>\n\n  @if (\n    rootGroup ||\n    (!rootGroup &&\n      (selectedEntity || (entities?.length === 1 && !entities[0]?.name)))\n  ) {\n    <div class=\"igx-filter-tree__section\">\n      @if (!this.isAdvancedFiltering()) {\n        <span class=\"igx-query-builder__label\">Where</span>\n      }\n      <ng-container\n        *ngTemplateOutlet=\"expressionGroupTemplate; context: context(rootGroup)\"\n      ></ng-container>\n    </div>\n  }\n</div>\n\n<igx-dialog\n  #entityChangeDialog\n  title=\"{{ this.resourceStrings.igx_query_builder_dialog_title }}\"\n  leftButtonLabel=\"{{ this.resourceStrings.igx_query_builder_dialog_cancel }}\"\n  rightButtonLabel=\"{{ this.resourceStrings.igx_query_builder_dialog_confirm }}\"\n  (leftButtonSelect)=\"onEntityChangeCancel()\"\n  (rightButtonSelect)=\"onEntityChangeConfirm()\"\n>\n  <section class=\"igx-query-builder-dialog\">\n    <p>{{ this.resourceStrings.igx_query_builder_dialog_message }}</p>\n    <igx-checkbox\n      (change)=\"onShowEntityChangeDialogChange($event)\"\n      [disableRipple]=\"true\"\n      [tabindex]=\"-1\"\n    >\n      {{ this.resourceStrings.igx_query_builder_dialog_checkbox_text }}\n    </igx-checkbox>\n  </section>\n</igx-dialog>\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { IgxQueryBuilderSearchValueContext } from './query-builder.common';\n\n/**\n * Defines the custom template that will be used for the search value input of condition in edit mode\n *\n * @igxModule IgxQueryBuilderModule\n * @igxKeywords query builder, query builder search value\n * @igxGroup Data entry and display\n *\n * @example\n * <igx-query-builder>\n *      <ng-template igxQueryBuilderSearchValue let-expression=\"expression\">\n *          <input type=\"text\" required [(ngModel)]=\"expression.searchVal\"/>\n *      </ng-template>\n *  </igx-query-builder>\n */\n@Directive({\n    selector: '[igxQueryBuilderSearchValue]',\n    standalone: true\n})\nexport class IgxQueryBuilderSearchValueTemplateDirective {\n    public template = inject<TemplateRef<IgxQueryBuilderSearchValueContext>>(TemplateRef);\n\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    public static ngTemplateContextGuard(_directive: IgxQueryBuilderSearchValueTemplateDirective, context: unknown): context is IgxQueryBuilderSearchValueContext {\n        return true;\n    }\n}\n","import {\n    booleanAttribute,\n    ContentChild,\n    EventEmitter,\n    Output,\n    TemplateRef,\n    inject,\n    ContentChildren,\n    QueryList,\n    ChangeDetectionStrategy,\n    ViewEncapsulation\n} from '@angular/core';\nimport {\n    Component, Input, ViewChild, OnDestroy, HostBinding\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport {\n    EntityType,\n    FieldType,\n    IExpressionTree,\n    IQueryBuilderResourceStrings,\n    QueryBuilderResourceStringsEN,\n    recreateTree,\n    getCurrentResourceStrings,\n    onResourceChangeHandle,\n    preventImplicitSubmission\n} from 'igniteui-angular/core';\nimport { IgxQueryBuilderTreeComponent } from './query-builder-tree.component';\nimport { IgxIconService } from 'igniteui-angular/icon';\nimport { editor } from '@igniteui/material-icons-extended';\nimport { IgxQueryBuilderSearchValueTemplateDirective } from './query-builder.directives';\nimport { IgxQueryBuilderSearchValueContext } from './query-builder.common';\nimport { IgxQueryBuilderHeaderComponent } from './query-builder-header.component';\n\n/* wcElementTag: igc-query-builder */\n/* blazorIndirectRender */\n/**\n * A component used for operating with complex filters by creating or editing conditions\n * and grouping them using AND/OR logic.\n * It is used internally in the Advanced Filtering of the Grid.\n *\n * @example\n * ```html\n * <igx-query-builder [entities]=\"this.entities\">\n * </igx-query-builder>\n * ```\n */\n@Component({\n    selector: 'igx-query-builder',\n    templateUrl: './query-builder.component.html',\n    styleUrls: ['./query-builder.component.css'],\n    encapsulation: ViewEncapsulation.None,\n    changeDetection: ChangeDetectionStrategy.Eager,\n    imports: [IgxQueryBuilderTreeComponent],\n    host: {\n        '(keydown)': 'preventImplicitSubmission($event)'\n    }\n})\nexport class IgxQueryBuilderComponent implements OnDestroy {\n    protected iconService = inject(IgxIconService);\n\n    protected readonly preventImplicitSubmission = preventImplicitSubmission;\n\n    /**\n     * @hidden @internal\n     */\n    @HostBinding('class.igx-query-builder')\n    public cssClass = 'igx-query-builder';\n\n    /**\n     * @hidden @internal\n     */\n    @HostBinding('style.display')\n    public display = 'block';\n\n    /**\n     * Gets/sets whether the confirmation dialog should be shown when changing entity.\n     * Default value is `true`.\n     */\n    @Input({ transform: booleanAttribute })\n    public showEntityChangeDialog = true;\n\n    /**\n     * Gets the list of entities available for the query builder.\n     *\n     * Each entity describes a logical group of fields that can be used in queries.\n     * An entity can optionally have child entities, allowing nested sub-queries.\n     *\n     * @returns An array of {@link EntityType} objects.\n     */\n    public get entities(): EntityType[] {\n        return this._entities;\n    }\n\n    /**\n     * Sets the list of entities for the query builder.\n     * If the `expressionTree` is defined, it will be recreated with the new entities.\n     *\n     * Each entity should be an {@link EntityType} object describing the fields and optionally child entities.\n     *\n     * Example:\n     * ```ts\n     * [\n     *   {\n     *     name: 'Orders',\n     *     fields: [{ field: 'OrderID', dataType: 'number' }],\n     *     childEntities: [\n     *       {\n     *         name: 'OrderDetails',\n     *         fields: [{ field: 'ProductID', dataType: 'number' }]\n     *       }\n     *     ]\n     *   }\n     * ]\n     * ```\n     *\n     * @param entities - The array of entities to set.\n     */\n    @Input()\n    public set entities(entities: EntityType[]) {\n        if (entities !== this._entities) {\n            if (entities && this.expressionTree) {\n                this._expressionTree = recreateTree(this._expressionTree, entities);\n            }\n        }\n        this._entities = entities;\n    }\n\n    /**\n     * Gets the list of fields for the QueryBuilder.\n     *\n     * @deprecated since version 19.1.0. Use the `entities` property instead.\n     * @hidden\n     */\n    public get fields(): FieldType[] {\n        return this._fields;\n    }\n\n    /**\n     * Sets the list of fields for the QueryBuilder.\n     * Automatically wraps them into a single entity to maintain backward compatibility.\n     *\n     * @param fields - The array of fields to set.\n     * @deprecated since version 19.1.0. Use the `entities` property instead.\n     * @hidden\n     */\n    @Input()\n    public set fields(fields: FieldType[]) {\n        if (fields) {\n            this._fields = fields;\n            this.entities = [\n                {\n                    name: null!,\n                    fields: fields\n                }\n            ];\n        }\n    }\n\n    /**\n    * Returns the expression tree.\n    */\n    public get expressionTree(): IExpressionTree {\n        return this._expressionTree;\n    }\n\n    /**\n     * Sets the expression tree.\n     */\n    @Input()\n    public set expressionTree(expressionTree: IExpressionTree) {\n        if (expressionTree !== this._expressionTree) {\n            if (this.entities && expressionTree) {\n                this._expressionTree = recreateTree(expressionTree, this.entities);\n            } else {\n                this._expressionTree = expressionTree;\n            }\n        }\n    }\n\n    /**\n     * Gets the `locale` of the query builder.\n     * If not set, defaults to application's locale.\n     */\n    @Input()\n    public locale!: string;\n\n    /**\n     * Sets the resource strings.\n     * By default it uses EN resources.\n     */\n    @Input()\n    public set resourceStrings(value: IQueryBuilderResourceStrings) {\n        this._resourceStrings = value;\n        this._customResourceStrings = Object.assign({}, this._defaultResourceStrings, this._resourceStrings);\n    }\n\n    /**\n     * Returns the resource strings.\n     */\n    public get resourceStrings(): IQueryBuilderResourceStrings {\n        return this._resourceStrings ? this._customResourceStrings : this._defaultResourceStrings;\n    }\n\n    /**\n     * Disables subsequent entity changes at the root level after the initial selection.\n     */\n    @Input()\n    public disableEntityChange = false;\n\n    /**\n     * Sets/gets the search value template.\n     */\n    @Input()\n    public set searchValueTemplate(template: TemplateRef<IgxQueryBuilderSearchValueContext>) {\n        this._searchValueTemplate = template;\n    }\n\n    public get searchValueTemplate(): TemplateRef<IgxQueryBuilderSearchValueContext> {\n        return this._searchValueTemplate || this.searchValueTemplateDirective?.template;\n    }\n\n    /**\n     * Disables return fields changes at the root level.\n     */\n    @Input()\n    public disableReturnFieldsChange = false;\n\n    /**\n     * Event fired as the expression tree is changed.\n     *\n     * ```html\n     *  <igx-query-builder (expressionTreeChange)='onExpressionTreeChange()'></igx-query-builder>\n     * ```\n     */\n    @Output()\n    public expressionTreeChange = new EventEmitter<IExpressionTree>();\n\n    /**\n     * @hidden @internal\n     */\n    @ContentChild(IgxQueryBuilderSearchValueTemplateDirective)\n    protected searchValueTemplateDirective!: IgxQueryBuilderSearchValueTemplateDirective;\n\n\n\n    /* contentChildren */\n    /* blazorInclude */\n    /* blazorTreatAsCollection */\n    /* blazorCollectionName: QueryBuilderHeaderCollection */\n    /* blazorCollectionItemName: QueryBuilderHeader */\n    /* ngQueryListName: queryBuilderHeaderCollection */\n    /** @hidden @internal */\n    @ContentChildren(IgxQueryBuilderHeaderComponent)\n    protected queryBuilderHeaderCollection!: QueryList<IgxQueryBuilderHeaderComponent>;\n\n    /**\n     * @hidden @internal\n     */\n    @ViewChild(IgxQueryBuilderTreeComponent)\n    public queryTree!: IgxQueryBuilderTreeComponent;\n\n    private destroy$ = new Subject<any>();\n    private _resourceStrings: IQueryBuilderResourceStrings = null!;\n    private _customResourceStrings: IQueryBuilderResourceStrings = null!;\n    private _defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN);\n    private _expressionTree!: IExpressionTree;\n    private _fields!: FieldType[];\n    private _entities!: EntityType[];\n    private _shouldEmitTreeChange = true;\n    private _searchValueTemplate!: TemplateRef<IgxQueryBuilderSearchValueContext>;\n\n    constructor() {\n        this.registerSVGIcons();\n        onResourceChangeHandle(this.destroy$, () => {\n            this._defaultResourceStrings = getCurrentResourceStrings(QueryBuilderResourceStringsEN, false);\n            this._customResourceStrings = this._resourceStrings ? Object.assign({}, this._defaultResourceStrings, this._resourceStrings) : null!;\n        }, this);\n    }\n\n    /**\n     * Returns whether the expression tree can be committed in the current state.\n     */\n    public canCommit(): boolean {\n        return this.queryTree?.canCommitCurrentState() === true;\n    }\n\n    /**\n     * Commits the expression tree in the current state if it is valid. If not throws an exception.\n     */\n    public commit(): void {\n        if (this.canCommit()) {\n            this._shouldEmitTreeChange = false;\n            this.queryTree.commitCurrentState();\n            this._shouldEmitTreeChange = true;\n        } else {\n            throw new Error('Expression tree can\\'t be committed in the current state. Use `canCommit` method to check if the current state is valid.');\n        }\n    }\n\n    /**\n     * Discards all unsaved changes to the expression tree.\n     */\n    public discard(): void {\n        this.queryTree.cancelOperandEdit();\n    }\n\n    /**\n     * @hidden @internal\n     */\n    public ngOnDestroy(): void {\n        this.destroy$.next(true);\n        this.destroy$.complete();\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public get isContextMenuVisible(): boolean {\n        return this.queryTree.isContextMenuVisible;\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public exitOperandEdit() {\n        this.queryTree.exitOperandEdit();\n    }\n\n    /**\n     * @hidden @internal\n     *\n     * used by the grid\n     */\n    public setAddButtonFocus() {\n        this.queryTree.setAddButtonFocus();\n    }\n\n    protected onExpressionTreeChange(tree: IExpressionTree) {\n        if (tree && this.entities && tree !== this._expressionTree) {\n            this._expressionTree = recreateTree(tree, this.entities);\n        } else {\n            this._expressionTree = tree;\n        }\n        if (this._shouldEmitTreeChange) {\n            this.expressionTreeChange.emit(tree);\n        }\n    }\n\n    private registerSVGIcons(): void {\n        const editorIcons = editor as any[];\n\n        editorIcons.forEach((icon) => {\n            this.iconService.addSvgIconFromText(icon.name, icon.value, 'imx-icons');\n            this.iconService.addIconRef(icon.name, 'default', {\n                name: icon.name,\n                family: 'imx-icons'\n            });\n        });\n\n        const inIcon = '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#5f6368\"><path d=\"M560-280H120v-400h720v120h-80v-40H200v240h360v80Zm-360-80v-240 240Zm560 200v-120H640v-80h120v-120h80v120h120v80H840v120h-80Z\"/></svg>';\n        this.iconService.addSvgIconFromText('in', inIcon, 'imx-icons');\n        this.iconService.addIconRef('in', 'default', {\n            name: 'in',\n            family: 'imx-icons'\n        });\n\n        const notInIcon = '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#5f6368\"><path d=\"M560-280H120v-400h720v120h-80v-40H200v240h360v80Zm-360-80v-240 240Zm440 104 84-84-84-84 56-56 84 84 84-84 56 56-83 84 83 84-56 56-84-83-84 83-56-56Z\"/></svg>';\n        this.iconService.addSvgIconFromText('not-in', notInIcon, 'imx-icons');\n        this.iconService.addIconRef('not-in', 'default', {\n            name: 'not-in',\n            family: 'imx-icons'\n        });\n\n        this.iconService.addIconRef('add', 'default', {\n            name: 'add',\n            family: 'material',\n        });\n\n        this.iconService.addIconRef('close', 'default', {\n            name: 'close',\n            family: 'material',\n        });\n\n        this.iconService.addIconRef('check', 'default', {\n            name: 'check',\n            family: 'material',\n        });\n\n        this.iconService.addIconRef('delete', 'default', {\n            name: 'delete',\n            family: 'material',\n        });\n\n        this.iconService.addIconRef('edit', 'default', {\n            name: 'edit',\n            family: 'material',\n        });\n    }\n}\n\n","<ng-content select=\"igx-query-builder-header,igc-query-builder-header\"></ng-content>\n\n<igx-query-builder-tree\n    [entities]=\"this.entities\"\n    [expressionTree]=\"this.expressionTree\"\n    [locale]=\"this.locale\"\n    [resourceStrings]=\"this.resourceStrings\"\n    [queryBuilder]=\"this\"\n    (expressionTreeChange)=\"onExpressionTreeChange($event)\"\n    [searchValueTemplate]=\"searchValueTemplate\">\n</igx-query-builder-tree>\n","import { IgxQueryBuilderHeaderComponent } from './query-builder-header.component';\nimport { IgxQueryBuilderComponent } from './query-builder.component';\nimport { IgxQueryBuilderSearchValueTemplateDirective } from './query-builder.directives';\n\nexport {\n    IgxQueryBuilderComponent\n} from './query-builder.component';\nexport * from './query-builder-header.component';\nexport * from './query-builder.directives';\n\n/* NOTE: Query builder directives collection for ease-of-use import in standalone components scenario */\nexport const IGX_QUERY_BUILDER_DIRECTIVES = [\n    IgxQueryBuilderComponent,\n    IgxQueryBuilderHeaderComponent,\n    IgxQueryBuilderSearchValueTemplateDirective,\n] as const;\n","import { NgModule } from '@angular/core';\nimport { IGX_QUERY_BUILDER_DIRECTIVES } from './public_api';\n\n/**\n * @hidden\n * IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components\n */\n@NgModule({\n    imports: [\n        ...IGX_QUERY_BUILDER_DIRECTIVES\n    ],\n    exports: [\n        ...IGX_QUERY_BUILDER_DIRECTIVES\n    ]\n})\nexport class IgxQueryBuilderModule { }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,iCAAb,MAAa,+BAA8B;CAUvC,IAAiC,WAAQ;EACrC,OAAO;CACX;CA+BA,IACW,gBAAgB,OAAmC;EAC1D,KAAK,mBAAmB;EACxB,KAAK,yBAAyB,OAAO,OAAO,CAAA,GAAI,KAAK,yBAAyB,KAAK,gBAAgB;CACvG;CAKA,IAAW,kBAAe;EACtB,OAAO,KAAK,mBAAmB,KAAK,yBAAyB,KAAK;CACtE;CAEA,cAAA;EAtDQ,KAAA,cAAc,OAAO,UAAU;EAC/B,KAAA,mBAAiD;EACjD,KAAA,yBAAuD;EACvD,KAAA,0BAA0B,0BAA0B,6BAA6B;EA8BlF,KAAA,aAAa;EAsBhB,uBAAuB,KAAK,mBAAkB;GAC1C,KAAK,0BAA0B,0BAA0B,+BAA+B,KAAK;GAC7F,KAAK,yBAAyB,KAAK,mBAAmB,OAAO,OAAO,CAAA,GAAI,KAAK,yBAAyB,KAAK,gBAAgB,IAAI;EACnI,GAAG,IAAI;CACX;CA7DS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA8B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA9B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA8B,cAAA;GAA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