tree-select.component.d.ts 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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 { FocusMonitor } from '@angular/cdk/a11y';
  6. import { Direction, Directionality } from '@angular/cdk/bidi';
  7. import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedOverlayPositionChange, ConnectionPositionPair } from '@angular/cdk/overlay';
  8. import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
  9. import { ControlValueAccessor } from '@angular/forms';
  10. import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
  11. import { NzFormStatusService } from 'ng-zorro-antd/core/form';
  12. import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';
  13. import { NzFormatEmitEvent, NzTreeBase, NzTreeNode, NzTreeNodeOptions } from 'ng-zorro-antd/core/tree';
  14. import { NgClassInterface, NgStyleInterface, NzSizeLDSType, NzStatus, NzValidateStatus, OnChangeType, OnTouchedType } from 'ng-zorro-antd/core/types';
  15. import { NzSelectSearchComponent } from 'ng-zorro-antd/select';
  16. import { NzTreeComponent } from 'ng-zorro-antd/tree';
  17. import { NzTreeSelectService } from './tree-select.service';
  18. import * as i0 from "@angular/core";
  19. import * as i1 from "ng-zorro-antd/space";
  20. export type NzPlacementType = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight' | '';
  21. export declare class NzTreeSelectComponent extends NzTreeBase implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {
  22. nzConfigService: NzConfigService;
  23. private renderer;
  24. private cdr;
  25. private elementRef;
  26. private directionality;
  27. private focusMonitor;
  28. readonly _nzModuleName: NzConfigKey;
  29. nzId: string | null;
  30. nzAllowClear: boolean;
  31. nzShowExpand: boolean;
  32. nzShowLine: boolean;
  33. nzDropdownMatchSelectWidth: boolean;
  34. nzCheckable: boolean;
  35. nzHideUnMatched: boolean;
  36. nzShowIcon: boolean;
  37. nzShowSearch: boolean;
  38. nzDisabled: boolean;
  39. nzAsyncData: boolean;
  40. nzMultiple: boolean;
  41. nzDefaultExpandAll: boolean;
  42. nzCheckStrictly: boolean;
  43. nzVirtualItemSize: number;
  44. nzVirtualMaxBufferPx: number;
  45. nzVirtualMinBufferPx: number;
  46. nzVirtualHeight: string | null;
  47. nzExpandedIcon?: TemplateRef<{
  48. $implicit: NzTreeNode;
  49. origin: NzTreeNodeOptions;
  50. }>;
  51. nzNotFoundContent?: string | TemplateRef<void>;
  52. nzNodes: NzTreeNodeOptions[] | NzTreeNode[];
  53. nzOpen: boolean;
  54. nzSize: NzSizeLDSType;
  55. nzPlaceHolder: string;
  56. nzDropdownStyle: NgStyleInterface | null;
  57. nzDropdownClassName?: string;
  58. nzBackdrop: boolean;
  59. nzStatus: NzStatus;
  60. nzPlacement: NzPlacementType;
  61. set nzExpandedKeys(value: string[]);
  62. get nzExpandedKeys(): string[];
  63. nzDisplayWith: (node: NzTreeNode) => string | undefined;
  64. nzMaxTagCount: number;
  65. nzMaxTagPlaceholder: TemplateRef<{
  66. $implicit: NzTreeNode[];
  67. }> | null;
  68. readonly nzOpenChange: EventEmitter<boolean>;
  69. readonly nzCleared: EventEmitter<void>;
  70. readonly nzRemoved: EventEmitter<NzTreeNode>;
  71. readonly nzExpandChange: EventEmitter<NzFormatEmitEvent>;
  72. readonly nzTreeClick: EventEmitter<NzFormatEmitEvent>;
  73. readonly nzTreeCheckboxChange: EventEmitter<NzFormatEmitEvent>;
  74. nzSelectSearchComponent: NzSelectSearchComponent;
  75. treeRef: NzTreeComponent;
  76. cdkOverlayOrigin: CdkOverlayOrigin;
  77. cdkConnectedOverlay: CdkConnectedOverlay;
  78. nzTreeTemplate: TemplateRef<{
  79. $implicit: NzTreeNode;
  80. origin: NzTreeNodeOptions;
  81. }>;
  82. nzTreeTemplateChild: TemplateRef<{
  83. $implicit: NzTreeNode;
  84. origin: NzTreeNodeOptions;
  85. }>;
  86. get treeTemplate(): TemplateRef<{
  87. $implicit: NzTreeNode;
  88. origin: NzTreeNodeOptions;
  89. }>;
  90. prefixCls: string;
  91. statusCls: NgClassInterface;
  92. status: NzValidateStatus;
  93. hasFeedback: boolean;
  94. dropdownClassName: string;
  95. triggerWidth?: number;
  96. isComposing: boolean;
  97. isDestroy: boolean;
  98. isNotFound: boolean;
  99. focused: boolean;
  100. inputValue: string;
  101. dropdownPosition: 'top' | 'center' | 'bottom';
  102. selectedNodes: NzTreeNode[];
  103. expandedKeys: string[];
  104. value: string[];
  105. dir: Direction;
  106. positions: ConnectionPositionPair[];
  107. protected finalSize: import("@angular/core").Signal<NzSizeLDSType>;
  108. private size;
  109. private compactSize;
  110. private destroy$;
  111. private isNzDisableFirstChange;
  112. private isComposingChange$;
  113. private searchValueChange$;
  114. onChange: OnChangeType;
  115. onTouched: OnTouchedType;
  116. get placeHolderDisplay(): string;
  117. get isMultiple(): boolean;
  118. noAnimation: NzNoAnimationDirective | null;
  119. nzFormStatusService: NzFormStatusService | null;
  120. private nzFormNoStatusService;
  121. constructor(nzTreeService: NzTreeSelectService, nzConfigService: NzConfigService, renderer: Renderer2, cdr: ChangeDetectorRef, elementRef: ElementRef, directionality: Directionality, focusMonitor: FocusMonitor);
  122. ngOnInit(): void;
  123. ngOnDestroy(): void;
  124. isComposingChange(isComposing: boolean): void;
  125. setDisabledState(isDisabled: boolean): void;
  126. private setStatusStyles;
  127. ngOnChanges({ nzNodes, nzDropdownClassName, nzStatus, nzPlacement, nzSize }: SimpleChanges): void;
  128. writeValue(value: string[] | string): void;
  129. registerOnChange(fn: (_: string[] | string | null) => void): void;
  130. registerOnTouched(fn: () => void): void;
  131. onKeydown(event: KeyboardEvent): void;
  132. trigger(): void;
  133. openDropdown(): void;
  134. closeDropDown(): void;
  135. onKeyDownInput(e: KeyboardEvent): void;
  136. onExpandedKeysChange(value: NzFormatEmitEvent): void;
  137. setInputValue(value: string): void;
  138. removeSelected(node: NzTreeNode, emit?: boolean): void;
  139. focusOnInput(): void;
  140. subscribeSelectionChange(): void;
  141. updateSelectedNodes(init?: boolean): void;
  142. updatePosition(): void;
  143. onPositionChange(position: ConnectedOverlayPositionChange): void;
  144. onClearSelection(): void;
  145. onClickOutside(event: MouseEvent): void;
  146. setSearchValues($event: NzFormatEmitEvent): void;
  147. updateCdkConnectedOverlayStatus(): void;
  148. clearSelectedNodes(): void;
  149. static ɵfac: i0.ɵɵFactoryDeclaration<NzTreeSelectComponent, never>;
  150. static ɵcmp: i0.ɵɵComponentDeclaration<NzTreeSelectComponent, "nz-tree-select", ["nzTreeSelect"], { "nzId": { "alias": "nzId"; "required": false; }; "nzAllowClear": { "alias": "nzAllowClear"; "required": false; }; "nzShowExpand": { "alias": "nzShowExpand"; "required": false; }; "nzShowLine": { "alias": "nzShowLine"; "required": false; }; "nzDropdownMatchSelectWidth": { "alias": "nzDropdownMatchSelectWidth"; "required": false; }; "nzCheckable": { "alias": "nzCheckable"; "required": false; }; "nzHideUnMatched": { "alias": "nzHideUnMatched"; "required": false; }; "nzShowIcon": { "alias": "nzShowIcon"; "required": false; }; "nzShowSearch": { "alias": "nzShowSearch"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzAsyncData": { "alias": "nzAsyncData"; "required": false; }; "nzMultiple": { "alias": "nzMultiple"; "required": false; }; "nzDefaultExpandAll": { "alias": "nzDefaultExpandAll"; "required": false; }; "nzCheckStrictly": { "alias": "nzCheckStrictly"; "required": false; }; "nzVirtualItemSize": { "alias": "nzVirtualItemSize"; "required": false; }; "nzVirtualMaxBufferPx": { "alias": "nzVirtualMaxBufferPx"; "required": false; }; "nzVirtualMinBufferPx": { "alias": "nzVirtualMinBufferPx"; "required": false; }; "nzVirtualHeight": { "alias": "nzVirtualHeight"; "required": false; }; "nzExpandedIcon": { "alias": "nzExpandedIcon"; "required": false; }; "nzNotFoundContent": { "alias": "nzNotFoundContent"; "required": false; }; "nzNodes": { "alias": "nzNodes"; "required": false; }; "nzOpen": { "alias": "nzOpen"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzPlaceHolder": { "alias": "nzPlaceHolder"; "required": false; }; "nzDropdownStyle": { "alias": "nzDropdownStyle"; "required": false; }; "nzDropdownClassName": { "alias": "nzDropdownClassName"; "required": false; }; "nzBackdrop": { "alias": "nzBackdrop"; "required": false; }; "nzStatus": { "alias": "nzStatus"; "required": false; }; "nzPlacement": { "alias": "nzPlacement"; "required": false; }; "nzExpandedKeys": { "alias": "nzExpandedKeys"; "required": false; }; "nzDisplayWith": { "alias": "nzDisplayWith"; "required": false; }; "nzMaxTagCount": { "alias": "nzMaxTagCount"; "required": false; }; "nzMaxTagPlaceholder": { "alias": "nzMaxTagPlaceholder"; "required": false; }; "nzTreeTemplate": { "alias": "nzTreeTemplate"; "required": false; }; }, { "nzOpenChange": "nzOpenChange"; "nzCleared": "nzCleared"; "nzRemoved": "nzRemoved"; "nzExpandChange": "nzExpandChange"; "nzTreeClick": "nzTreeClick"; "nzTreeCheckboxChange": "nzTreeCheckboxChange"; }, ["nzTreeTemplateChild"], never, true, [{ directive: typeof i1.NzSpaceCompactItemDirective; inputs: {}; outputs: {}; }]>;
  151. static ngAcceptInputType_nzAllowClear: unknown;
  152. static ngAcceptInputType_nzShowExpand: unknown;
  153. static ngAcceptInputType_nzShowLine: unknown;
  154. static ngAcceptInputType_nzDropdownMatchSelectWidth: unknown;
  155. static ngAcceptInputType_nzCheckable: unknown;
  156. static ngAcceptInputType_nzHideUnMatched: unknown;
  157. static ngAcceptInputType_nzShowIcon: unknown;
  158. static ngAcceptInputType_nzShowSearch: unknown;
  159. static ngAcceptInputType_nzDisabled: unknown;
  160. static ngAcceptInputType_nzAsyncData: unknown;
  161. static ngAcceptInputType_nzMultiple: unknown;
  162. static ngAcceptInputType_nzDefaultExpandAll: unknown;
  163. static ngAcceptInputType_nzCheckStrictly: unknown;
  164. static ngAcceptInputType_nzMaxTagCount: unknown;
  165. }