import * as i0 from '@angular/core'; import { OnInit, OnDestroy, DestroyRef, ChangeDetectorRef, IterableDiffer, ViewContainerRef, AfterViewInit, OnChanges, SimpleChanges, EventEmitter, TrackByFunction } from '@angular/core'; import { Directionality, Direction } from '@angular/cdk/bidi'; import { DataSource, CollectionViewer } from '@angular/cdk/collections'; import { CdkTree, TreeControl, CdkTreeNodeOutlet, CdkTreeNode, CdkTreeNodeDef, CdkTreeNodeOutletContext, CdkTreeNodeToggle, CdkTreeNodePadding, FlatTreeControl } from '@angular/cdk/tree'; import { Subject, Observable, BehaviorSubject } from 'rxjs'; import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeView extends CdkTree implements OnInit, OnDestroy { noAnimation: NzNoAnimationDirective | null; protected destroyRef: DestroyRef; protected directionality: Directionality; protected cdr: ChangeDetectorRef; dir: Direction; _dataSourceChanged: Subject; treeControl?: TreeControl; get dataSource(): DataSource | Observable | T[]; set dataSource(dataSource: DataSource | Observable | T[]); nzDirectoryTree: boolean; nzBlockNode: boolean; ngOnInit(): void; renderNodeChanges(data: T[] | readonly T[], dataDiffer?: IterableDiffer, viewContainer?: ViewContainerRef, parentData?: T): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, { "treeControl": { "alias": "nzTreeControl"; "required": false; }; "dataSource": { "alias": "nzDataSource"; "required": false; }; "nzDirectoryTree": { "alias": "nzDirectoryTree"; "required": false; }; "nzBlockNode": { "alias": "nzBlockNode"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_nzDirectoryTree: unknown; static ngAcceptInputType_nzBlockNode: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeNodeOutletDirective extends CdkTreeNodeOutlet { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NzTreeViewComponent extends NzTreeView implements AfterViewInit { nodeOutlet: NzTreeNodeOutletDirective; _afterViewInit: boolean; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nz-tree-view", ["nzTreeView"], {}, {}, never, never, true, never>; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare abstract class NzNodeBase extends CdkTreeNode { abstract setIndents(indents: boolean[]): void; abstract isLeaf: boolean; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ interface NzTreeVirtualNodeData { data: T; context: CdkTreeNodeOutletContext; nodeDef: CdkTreeNodeDef; } declare class NzTreeNodeComponent extends NzNodeBase implements OnInit { indents: boolean[]; disabled: boolean; selected: boolean; isLeaf: boolean; private cdr; ngOnInit(): void; disable(): void; enable(): void; select(): void; deselect(): void; setIndents(indents: boolean[]): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nz-tree-node:not([builtin])", ["nzTreeNode"], {}, {}, never, ["nz-tree-node-toggle, [nz-tree-node-toggle]", "nz-tree-node-checkbox", "nz-tree-node-option", "*"], true, never>; } declare class NzTreeNodeDefDirective extends CdkTreeNodeDef { when: (index: number, nodeData: T) => boolean; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[nzTreeNodeDef]", never, { "when": { "alias": "nzTreeNodeDefWhen"; "required": false; }; }, {}, never, never, true, never>; } declare class NzTreeVirtualScrollNodeOutletDirective implements OnChanges { private _viewRef; private _viewContainerRef; data: NzTreeVirtualNodeData; compareBy?: ((value: T) => T | string | number) | null; ngOnChanges(changes: SimpleChanges): void; private shouldRecreateView; private hasContextShapeChanged; get innerCompareBy(): (value: T | null) => T | string | number | null; private updateExistingContext; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[nzTreeVirtualScrollNodeOutlet]", never, { "data": { "alias": "data"; "required": false; }; "compareBy": { "alias": "compareBy"; "required": false; }; }, {}, never, never, true, never>; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeNodeNoopToggleDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NzTreeNodeToggleDirective extends CdkTreeNodeToggle { recursive: boolean; get isExpanded(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "nz-tree-node-toggle:not([nzTreeNodeNoopToggle]), [nzTreeNodeToggle]", never, { "recursive": { "alias": "nzTreeNodeToggleRecursive"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_recursive: unknown; } declare class NzTreeNodeToggleRotateIconDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NzTreeNodeToggleActiveIconDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeNodePaddingDirective extends CdkTreeNodePadding { _indent: number; get level(): number; set level(value: number); get indent(): number | string; set indent(indent: number | string); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[nzTreeNodePadding]", never, { "level": { "alias": "nzTreeNodePadding"; "required": false; }; "indent": { "alias": "nzTreeNodePaddingIndent"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_level: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeNodeOptionComponent implements OnChanges, OnInit { private ngZone; private el; private destroyRef; private treeNode; nzSelected: boolean; nzDisabled: boolean; readonly nzClick: EventEmitter; get isExpanded(): boolean; ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nz-tree-node-option", never, { "nzSelected": { "alias": "nzSelected"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; }, { "nzClick": "nzClick"; }, never, ["*"], true, never>; static ngAcceptInputType_nzSelected: unknown; static ngAcceptInputType_nzDisabled: unknown; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeNodeCheckboxComponent implements OnInit { private ngZone; private ref; private el; private destroyRef; nzChecked?: boolean; nzIndeterminate?: boolean; nzDisabled?: boolean; readonly nzClick: EventEmitter; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzChecked: unknown; static ngAcceptInputType_nzIndeterminate: unknown; static ngAcceptInputType_nzDisabled: unknown; } declare class NzTreeNodeIndentsComponent { indents: boolean[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NzTreeNodeIndentLineDirective { private treeNode; private tree; private cdr; private destroyRef; isLast: boolean | 'unset'; isLeaf: boolean; private preNodeRef; private nextNodeRef; private currentIndents; constructor(); private getIndents; private buildIndents; /** * We need to add an class name for the last child node, * this result can also be affected when the adjacent nodes are changed. */ private checkAdjacent; private checkLast; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "nz-tree-node[nzTreeNodeIndentLine]", never, {}, {}, never, never, true, never>; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeVirtualScrollViewComponent extends NzTreeView implements OnChanges { readonly nodeOutlet: NzTreeNodeOutletDirective; readonly virtualScrollViewport: CdkVirtualScrollViewport; nzItemSize: number; nzMinBufferPx: number; nzMaxBufferPx: number; trackBy: TrackByFunction; nodes: Array>; innerTrackBy: TrackByFunction>; ngOnChanges({ trackBy }: SimpleChanges): void; get compareBy(): ((value: T) => NzSafeAny) | null; renderNodeChanges(data: T[] | readonly T[]): void; /** * @note * angular/cdk v18.2.0 breaking changes: https://github.com/angular/components/pull/29062 * Temporary workaround: revert to old method of getting level * TODO: refactor tree-view, remove #treeControl and adopt #levelAccessor and #childrenAccessor * */ _getLevel(nodeData: T): number | undefined; private createNode; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nz-tree-virtual-scroll-view", ["nzTreeVirtualScrollView"], { "nzItemSize": { "alias": "nzItemSize"; "required": false; }; "nzMinBufferPx": { "alias": "nzMinBufferPx"; "required": false; }; "nzMaxBufferPx": { "alias": "nzMaxBufferPx"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; }, {}, never, never, true, never>; } declare class NzTreeViewModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare const getParent: (nodes: T[], node: T, getLevel: (dataNode: T) => number) => T | null; declare const getNextSibling: (nodes: T[], node: T, getLevel: (dataNode: T) => number, _index?: number) => T | null; /** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ declare class NzTreeFlattener { 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); private flattenNode; private flattenChildren; /** * Flatten a list of node type T to flattened version of node F. * Please note that type T may be nested, and the length of `structuredData` may be different * from that of returned list `F[]`. */ flattenNodes(structuredData: T[]): F[]; /** * Expand flattened node with current expansion status. * The returned list may have different length. */ expandFlattenedNodes(nodes: F[], treeControl: TreeControl): F[]; } declare class NzTreeFlatDataSource extends DataSource { private _treeControl; private _treeFlattener; _flattenedData: BehaviorSubject; _expandedData: BehaviorSubject; _data: BehaviorSubject; constructor(_treeControl: FlatTreeControl, _treeFlattener: NzTreeFlattener, initialData?: T[]); setData(value: T[]): void; getData(): T[]; connect(collectionViewer: CollectionViewer): Observable; disconnect(): void; private flatNodes; } export { NzTreeFlatDataSource, NzTreeFlattener, NzTreeNodeCheckboxComponent, NzTreeNodeComponent, NzTreeNodeDefDirective, NzTreeNodeIndentLineDirective, NzTreeNodeIndentsComponent, NzTreeNodeNoopToggleDirective, NzTreeNodeOptionComponent, NzTreeNodeOutletDirective, NzTreeNodePaddingDirective, NzTreeNodeToggleActiveIconDirective, NzTreeNodeToggleDirective, NzTreeNodeToggleRotateIconDirective, NzTreeView, NzTreeViewComponent, NzTreeViewModule, NzTreeVirtualScrollNodeOutletDirective, NzTreeVirtualScrollViewComponent, getNextSibling, getParent }; export type { NzTreeVirtualNodeData };