import { OnInit } from '@angular/core'; import { FilterComponent } from '../filter.component'; import { FiltersService } from '../filters.service'; import { FilterContainerService } from '../filter-container.service'; import { TermNode, Term } from '../../entities/public-api'; import { FlatTreeControl } from '@angular/cdk/tree'; import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material'; import { Observable } from 'rxjs'; import { SelectionModel } from '@angular/cdk/collections'; import { FormControl } from '@angular/forms'; export interface FlatTreeNodeFilter { name: string; level: number; expandable: boolean; term: Term; } interface TreeFilterData { selectOptions: TermNode[]; type: string; placeholder: string; text: string; field: string; index: number; value: any; idVocab: number; } export declare class TreeFilterComponent implements OnInit, FilterComponent { private filterService; private filterContainerService; data: TreeFilterData; chipsList: []; treeControl: FlatTreeControl; treeFlattener: MatTreeFlattener; dataSource: MatTreeFlatDataSource; checklistSelection: SelectionModel; myControl: FormControl; inputId: string; constructor(filterService: FiltersService, filterContainerService: FilterContainerService); ngOnInit(): void; private _filter; /** return true if any children is include, false otherwise */ private _include_node; private _fix_selection; remove_component(): void; onChange(): void; emitSelection(): void; /** Transform the data to something the tree can read. */ transformer(node: TermNode, level: number): { name: string; level: number; expandable: boolean; term: Term; }; /** Get the level of the node */ getLevel(node: FlatTreeNodeFilter): number; /** Get whether the node is expanded or not. */ isExpandable(node: FlatTreeNodeFilter): boolean; /** Get whether the node has children or not. */ hasChild(index: number, node: FlatTreeNodeFilter): boolean; /** Get the children for the node. */ getChildren(node: TermNode): Observable; /** Whether all the descendants of the node are selected. */ descendantsAllSelected(node: FlatTreeNodeFilter): boolean; /** Whether part of the descendants are selected */ descendantsPartiallySelected(node: FlatTreeNodeFilter): boolean; /** Select/deselect all the descendants node */ itemSelectionToggle(node: FlatTreeNodeFilter): void; /** Check all the parents to see if they changed */ leafItemSelectionToggle(node: FlatTreeNodeFilter): void; checkAllParentsSelection(node: FlatTreeNodeFilter): void; /** Check root node checked state and change it accordingly */ checkRootNodeSelection(node: FlatTreeNodeFilter): void; getParentNode(node: FlatTreeNodeFilter): FlatTreeNodeFilter | null; removeChip(i: any): void; } export {};