import { ViewContainerRef, ComponentFactoryResolver } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { IPepQueryBuilderField, IPepQuerySection, IPepQueryItem } from '../../common/model/legacy'; import { PepQueryBuilderService } from '../../query-builder.service'; import { PepOutputQueryService } from '../../common/services/output-query.service'; import { PepOperatorTypes } from '../../common/model/type'; import * as i0 from "@angular/core"; export declare class PepQueryStructureService { private _resolver; private _outputQueryService; private _queryBuilderService; private _outputQuery$; private _smartFilterFields; private _variableFields; private _form; private _maxStructureDepth; outputQuery$: import("rxjs").Observable; constructor(_resolver: ComponentFactoryResolver, _outputQueryService: PepOutputQueryService, _queryBuilderService: PepQueryBuilderService); set maxDepth(value: number); get maxDepth(): number; set fields(list: Array); get hasFields(): boolean; set variableFields(list: Array); set form(value: FormGroup); get form(): FormGroup; /** * builds a dynamic UI query structure * might has a different structure than the query's due to parent-child elements merge * @param query legacy query * @param containerRef reference to root element */ buildQueryStructure(query: IPepQuerySection | IPepQueryItem, containerRef: ViewContainerRef): void; /** * checks if the object contains property * @param obj object * @param prop property name * @returns true if contains, false otherwise */ private hasProperty; /** * a recursive function dynamically builds UI filters structure * @param parentOperator parent legacy complex operator * @param current child legacy object (either another complex or expression type) * @param containerRef parent element * @param parentForm parent form */ private flatten; /** * creates a container object of two or more child filter items * @param operator AND/OR operator * @param containerRef parent element * @param parentForm parent form * @param depth * @returns an object containing the current element and current form */ createSection(operator: PepOperatorTypes, containerRef: ViewContainerRef, parentForm: FormGroup, depth: number): { containerRef: ViewContainerRef; parentForm: FormGroup<{ operator: FormControl; }>; }; /** * creates a component represents filter item (leaf element - has no childs) * @param current filter legacy element * @param containerRef parent element * @param parentForm parent form */ createItem(current: IPepQueryItem, containerRef: ViewContainerRef, parentForm: FormGroup): void; /** * get smart filter field * @param current filter legacy element * @returns smart filter field, if not found returns the first field */ private getSelectedField; private convertSmartFilterComponentType; /** * creates a legacy output query */ createOutputQuery(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }