import { OnInit, EventEmitter, AfterViewInit, OnDestroy } from '@angular/core'; import { SelectionModel } from '@angular/cdk/collections'; import { FlatTreeControl } from '@angular/cdk/tree'; import { MatTreeFlattener, MatTreeFlatDataSource } from '@angular/material/tree'; import { NmTransferPickerService } from './transfer-picker.service'; import { SourceOptions, TransferItemFlatNode, TransferItemNode } from './interface'; export declare class NmTransferPickerSourceComponent implements OnInit, AfterViewInit, OnDestroy { private service; checklistChange: EventEmitter; /** Map from nested node to flattened node. This helps us to keep the same object for selection */ nestedNodeMap: Map; treeControl: FlatTreeControl; treeFlattener: MatTreeFlattener; dataSource: MatTreeFlatDataSource; /** The selection for checklist */ checklistSelection: SelectionModel; options: SourceOptions; selectedList: Array; private ngUnsubscribe; constructor(service: NmTransferPickerService); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; getSelectedList(): Array; resetSelectedItem(item: TransferItemFlatNode): void; private getLevel; private isExpandable; private getChildren; hasChild: (_: number, _nodeData: TransferItemFlatNode) => boolean; /** * Transformer to convert nested node to flat node. Record the nodes in maps for later use. */ private transformer; /** Whether all the descendants of the node are selected */ descendantsAllSelected(node: TransferItemFlatNode): boolean; /** Whether part of the descendants are selected */ descendantsPartiallySelected(node: TransferItemFlatNode): boolean; /** Toggle the transfer item selection. Select/deselect all the descendants node */ transferItemSelectionToggle(node: TransferItemFlatNode): void; /** Toggle a leaf transfer item selection. Check all the parents to see if they changed */ transferLeafItemSelectionToggle(node: TransferItemFlatNode): void; private checkAllParentsSelection; /** Check root node checked state and change it accordingly */ private checkRootNodeSelection; private getParentNode; }