import { CollectionViewer, DataSource } from '@angular/cdk/collections'; import { FlatTreeControl, TreeControl } from '@angular/cdk/tree'; import { Observable } from 'rxjs'; export declare class RealsoftTreeFlattener { transformFunction: (node: T, level: number) => F; getLevel: (node: F) => number; isExpandable: (node: F) => boolean; getChildren: (node: T) => Observable | T[] | undefined | null; constructor(transformFunction: (node: T, level: number) => F, getLevel: (node: F) => number, isExpandable: (node: F) => boolean, getChildren: (node: T) => Observable | T[] | undefined | null); /** * @param node → The current node being processed. * @param level → The depth level of the node in the hierarchy. * @param resultNodes → The array that will store the flattened nodes. * @param parentMap: boolean[] → A boolean array that is be used to track parent-child relationships. * @returns F[] → The updated list of flattened nodes. */ flattenNode(node: T, level: number, resultNodes: F[], parentMap: boolean[]): F[]; /** * * @param children children: T[] → An array of child nodes to be processed. * @param level : number → The current depth level in the hierarchy. * @param resultNodes : F[] → The array that accumulates flattened nodes. * @param parentMap : boolean[] → A boolean array tracking parent-child relationships (useful for visualizing tree structures). * @returns void → Does not return anything explicitly; instead, it modifies resultNodes directly. */ flattenChildren(children: T[], level: number, resultNodes: F[], parentMap: boolean[]): void; flattenNodes(structuredData: T[]): F[]; /** * * @param nodes : F[] → The flattened list of nodes. * @param treeControl : TreeControl → A tree control object that manages the expansion state of each node. * @returns F[] → A new array containing only the visible (expanded) nodes. */ expandFlattenedNodes(nodes: F[], treeControl: TreeControl): F[]; } export declare class RealsoftTreeFlatDataSource extends DataSource { private _treeControl; private _treeFlattener; private readonly _flattenedData; private readonly _expandedData; private readonly _data; get data(): T[]; set data(value: T[]); constructor(_treeControl: FlatTreeControl, _treeFlattener: RealsoftTreeFlattener, initialData?: T[]); connect(collectionViewer: CollectionViewer): Observable; disconnect(): void; } export declare class RealsoftTreeNestedDataSource extends DataSource { private readonly _data; get data(): T[]; set data(value: T[]); connect(collectionViewer: CollectionViewer): Observable; disconnect(): void; }