graph-data-source.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { SelectionModel } from '@angular/cdk/collections';
  6. import { Observable } from 'rxjs';
  7. import { NzGraphDataDef } from '../interface';
  8. import { NzGraphBaseSource } from './base-graph-source';
  9. export declare class NzGraphData implements NzGraphBaseSource<NzGraphDataDef, string> {
  10. private _data;
  11. dataSource: NzGraphDataDef;
  12. /** A selection model with multi-selection to track expansion status. */
  13. expansionModel: SelectionModel<string>;
  14. /** Toggles one single data node's expanded/collapsed state. */
  15. toggle(nodeName: string): void;
  16. /** Expands one single data node. */
  17. expand(nodeName: string): void;
  18. /** Collapses one single data node. */
  19. collapse(nodeName: string): void;
  20. /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */
  21. isExpanded(nodeName: string): boolean;
  22. /** Collapse all dataNodes in the tree. */
  23. collapseAll(): void;
  24. expandAll(): void;
  25. setData(data: NzGraphDataDef): void;
  26. constructor(source?: NzGraphDataDef);
  27. connect(): Observable<NzGraphDataDef>;
  28. disconnect(): void;
  29. private findParents;
  30. private findChildren;
  31. }