import * as i0 from '@angular/core'; import { OnInit, OnChanges, AfterViewInit, TemplateRef, EventEmitter, SimpleChanges } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { ControlValueAccessor } from '@angular/forms'; import { Observable, Subject } from 'rxjs'; import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config'; import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation'; import { NzTreeBase, NzTreeNode, NzTreeNodeOptions, NzFormatBeforeDropEvent, NzTreeNodeKey, NzFormatEmitEvent, NzTreeBaseService } from 'ng-zorro-antd/core/tree'; export { NzFormatBeforeDropEvent, NzFormatEmitEvent, NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/core/tree'; import { NzSafeAny, NgStyleInterface } from 'ng-zorro-antd/core/types'; /** * 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 function NzTreeServiceFactory(): NzTreeBaseService; declare class NzTreeComponent extends NzTreeBase implements OnInit, ControlValueAccessor, OnChanges, AfterViewInit { readonly _nzModuleName: NzConfigKey; noAnimation: NzNoAnimationDirective | null; nzConfigService: NzConfigService; private cdr; private directionality; private destroyRef; nzShowIcon: boolean; nzHideUnMatched: boolean; nzBlockNode: boolean; nzExpandAll: boolean; nzSelectMode: boolean; nzCheckStrictly: boolean; nzShowExpand: boolean; nzShowLine: boolean; nzCheckable: boolean; nzAsyncData: boolean; nzDraggable: boolean; nzMultiple: boolean; nzExpandedIcon?: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }>; nzVirtualItemSize: number; nzVirtualMaxBufferPx: number; nzVirtualMinBufferPx: number; nzVirtualHeight: string | null; nzTreeTemplate?: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }>; nzBeforeDrop?: (confirm: NzFormatBeforeDropEvent) => Observable; nzData: NzTreeNodeOptions[] | NzTreeNode[]; nzExpandedKeys: NzTreeNodeKey[]; nzSelectedKeys: NzTreeNodeKey[]; nzCheckedKeys: NzTreeNodeKey[]; nzSearchValue: string; nzSearchFunc?: (node: NzTreeNodeOptions) => boolean; nzTreeTemplateChild: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }>; cdkVirtualScrollViewport: CdkVirtualScrollViewport; nzFlattenNodes: NzTreeNode[]; beforeInit: boolean; dir: Direction; readonly nzExpandedKeysChange: EventEmitter; readonly nzSelectedKeysChange: EventEmitter; readonly nzCheckedKeysChange: EventEmitter; readonly nzSearchValueChange: EventEmitter; readonly nzClick: EventEmitter; readonly nzDblClick: EventEmitter; readonly nzContextMenu: EventEmitter; readonly nzCheckboxChange: EventEmitter; readonly nzExpandChange: EventEmitter; readonly nzOnDragStart: EventEmitter; readonly nzOnDragEnter: EventEmitter; readonly nzOnDragOver: EventEmitter; readonly nzOnDragLeave: EventEmitter; readonly nzOnDrop: EventEmitter; readonly nzOnDragEnd: EventEmitter; HIDDEN_STYLE: { width: number; height: number; display: string; overflow: string; opacity: number; border: number; padding: number; margin: number; }; HIDDEN_NODE_STYLE: { position: string; pointerEvents: string; visibility: string; height: number; overflow: string; }; onChange: (value: NzTreeNode[]) => void; onTouched: () => void; writeValue(value: NzTreeNode[]): void; registerOnChange(fn: (_: NzTreeNode[]) => void): void; registerOnTouched(fn: () => void): void; /** * Render all properties of nzTree * * @param changes all changes from @Input */ renderTreeProperties(changes: SimpleChanges): void; trackByFlattenNode(_: number, node: NzTreeNode): string; /** * nzData * * @param value */ handleNzData(value: NzSafeAny[]): void; handleFlattenNodes(data: NzTreeNode[], expandKeys?: NzTreeNodeKey[] | true): void; handleCheckedKeys(keys: NzTreeNodeKey[] | null): void; handleExpandedKeys(keys?: NzTreeNodeKey[] | true): void; handleSelectedKeys(keys: NzTreeNodeKey[], isMulti: boolean): void; handleSearchValue(value: string, searchFunc?: (node: NzTreeNodeOptions) => boolean): void; /** * Handle emit event * * @param event * handle each event */ eventTriggerChanged(event: NzFormatEmitEvent): void; /** * Click expand icon */ renderTree(): void; constructor(); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzShowIcon: unknown; static ngAcceptInputType_nzHideUnMatched: unknown; static ngAcceptInputType_nzBlockNode: unknown; static ngAcceptInputType_nzExpandAll: unknown; static ngAcceptInputType_nzSelectMode: unknown; static ngAcceptInputType_nzCheckStrictly: unknown; static ngAcceptInputType_nzShowExpand: unknown; static ngAcceptInputType_nzShowLine: unknown; static ngAcceptInputType_nzCheckable: unknown; static ngAcceptInputType_nzAsyncData: unknown; static ngAcceptInputType_nzDraggable: unknown; static ngAcceptInputType_nzMultiple: 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 NzTreeNodeBuiltinComponent implements OnInit, OnChanges { noAnimation: NzNoAnimationDirective | null; nzTreeService: NzTreeBaseService; private ngZone; private renderer; private el; private cdr; private destroyRef; icon: string; title: string; isLoading: boolean; isSelected: boolean; isDisabled: boolean; isMatched: boolean; isExpanded: boolean; isLeaf: boolean; isChecked?: boolean; isHalfChecked?: boolean; isDisableCheckbox?: boolean; isSelectable?: boolean; canHide?: boolean; isStart: boolean[]; isEnd: boolean[]; nzTreeNode: NzTreeNode; nzShowLine?: boolean; nzShowExpand?: boolean; nzCheckable?: boolean; nzAsyncData?: boolean; nzHideUnMatched: boolean; nzNoAnimation: boolean; nzSelectMode: boolean; nzShowIcon: boolean; nzExpandedIcon?: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }>; nzTreeTemplate: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }> | null; nzBeforeDrop?: (confirm: NzFormatBeforeDropEvent) => Observable; nzSearchValue: string; nzDraggable: boolean; readonly nzClick: EventEmitter; readonly nzDblClick: EventEmitter; readonly nzContextMenu: EventEmitter; readonly nzCheckboxChange: EventEmitter; readonly nzExpandChange: EventEmitter; readonly nzOnDragStart: EventEmitter; readonly nzOnDragEnter: EventEmitter; readonly nzOnDragOver: EventEmitter; readonly nzOnDragLeave: EventEmitter; readonly nzOnDrop: EventEmitter; readonly nzOnDragEnd: EventEmitter; /** * drag var */ destroy$: Subject; dragPos: number; dragPosClass: Record; draggingKey: string | null; showIndicator: boolean; /** * default set */ get displayStyle(): string; get isSwitcherOpen(): boolean; get isSwitcherClose(): boolean; /** * collapse node * * @param event */ clickExpand(event: MouseEvent): void; clickSelect(event: MouseEvent): void; dblClick(event: MouseEvent): void; contextMenu(event: MouseEvent): void; /** * check node * * @param event */ clickCheckbox(event: MouseEvent): void; clearDragClass(): void; /** * drag event * * @param e */ handleDragStart(e: DragEvent): void; handleDragEnter(e: DragEvent): void; handleDragOver(e: DragEvent): void; handleDragLeave(e: DragEvent): void; handleDragDrop(e: DragEvent): void; handleDragEnd(e: DragEvent): void; /** * Listening to dragging events. */ handDragEvent(): void; markForCheck(): void; constructor(); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; private renderIndicator; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isLoading: unknown; static ngAcceptInputType_isSelected: unknown; static ngAcceptInputType_isDisabled: unknown; static ngAcceptInputType_isMatched: unknown; static ngAcceptInputType_isExpanded: unknown; static ngAcceptInputType_isLeaf: unknown; static ngAcceptInputType_isChecked: unknown; static ngAcceptInputType_isHalfChecked: unknown; static ngAcceptInputType_isDisableCheckbox: unknown; static ngAcceptInputType_isSelectable: unknown; static ngAcceptInputType_canHide: unknown; static ngAcceptInputType_nzShowLine: unknown; static ngAcceptInputType_nzShowExpand: unknown; static ngAcceptInputType_nzCheckable: unknown; static ngAcceptInputType_nzAsyncData: unknown; static ngAcceptInputType_nzHideUnMatched: unknown; static ngAcceptInputType_nzNoAnimation: unknown; static ngAcceptInputType_nzSelectMode: unknown; static ngAcceptInputType_nzShowIcon: unknown; static ngAcceptInputType_nzDraggable: 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 NzTreeIndentComponent implements OnChanges { nzTreeLevel: number; nzIsStart: boolean[]; nzIsEnd: boolean[]; nzSelectMode: boolean; listOfUnit: number[]; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * 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 NzTreeNodeSwitcherComponent { nzShowExpand?: boolean; nzShowLine?: boolean; nzExpandedIcon?: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }>; nzSelectMode: boolean; context: NzTreeNode; isLeaf?: boolean; isLoading?: boolean; isExpanded?: boolean; get isShowLineIcon(): boolean; get isShowSwitchIcon(): boolean; get isSwitcherOpen(): boolean; get isSwitcherClose(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzShowExpand: unknown; static ngAcceptInputType_nzShowLine: unknown; static ngAcceptInputType_isLeaf: unknown; static ngAcceptInputType_isLoading: unknown; static ngAcceptInputType_isExpanded: unknown; } declare class NzTreeNodeBuiltinCheckboxComponent { nzSelectMode: boolean; isChecked?: boolean; isHalfChecked?: boolean; isDisabled?: boolean; isDisableCheckbox?: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isChecked: unknown; static ngAcceptInputType_isHalfChecked: unknown; static ngAcceptInputType_isDisabled: unknown; static ngAcceptInputType_isDisableCheckbox: unknown; } declare class NzTreeNodeTitleComponent implements OnChanges { private cdr; searchValue: string; treeTemplate: TemplateRef<{ $implicit: NzTreeNode; origin: NzTreeNodeOptions; }> | null; draggable: boolean; showIcon: boolean; selectMode: boolean; context: NzTreeNode; icon: string; title: string; isLoading: boolean; isSelected: boolean; isDisabled: boolean; isMatched: boolean; isExpanded: boolean; isLeaf: boolean; showIndicator: boolean; dragPosition?: number; get canDraggable(): boolean | null; get matchedValue(): string; get isSwitcherOpen(): boolean; get isSwitcherClose(): boolean; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_draggable: unknown; static ngAcceptInputType_showIcon: unknown; static ngAcceptInputType_isLoading: unknown; static ngAcceptInputType_isSelected: unknown; static ngAcceptInputType_isDisabled: unknown; static ngAcceptInputType_isMatched: unknown; static ngAcceptInputType_isExpanded: unknown; static ngAcceptInputType_isLeaf: 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 NzTreeDropIndicatorComponent implements OnChanges { dropPosition?: number; level: number; direction: Direction; style: NgStyleInterface; private cdr; ngOnChanges(): void; renderIndicator(dropPosition: number, direction?: Direction): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_level: unknown; } declare class NzTreeModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class NzTreeService extends NzTreeBaseService { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { NzTreeComponent, NzTreeIndentComponent, NzTreeModule, NzTreeNodeBuiltinCheckboxComponent, NzTreeNodeBuiltinComponent, NzTreeNodeSwitcherComponent, NzTreeNodeTitleComponent, NzTreeService, NzTreeServiceFactory };