ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
119 lines (110 loc) • 6.19 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterContentInit, OnInit, ViewContainerRef, EventEmitter, TemplateRef, AfterViewInit, OnChanges, ElementRef, SimpleChanges, EmbeddedViewRef } from '@angular/core';
import { NzConfigService, NzConfigKey } from 'ng-zorro-antd/core/config';
import { IndexableObject, NzSafeAny } from 'ng-zorro-antd/core/types';
import * as rxjs from 'rxjs';
import { BehaviorSubject } from 'rxjs';
import { AnimationEvent } from '@angular/animations';
import { Direction } from '@angular/cdk/bidi';
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';
import * as i6 from 'ng-zorro-antd/menu';
import { MenuService } from 'ng-zorro-antd/menu';
type NzPlacementType = 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
declare class NzDropdownMenuComponent implements AfterContentInit, OnInit {
private cdr;
private elementRef;
private renderer;
viewContainerRef: ViewContainerRef;
private directionality;
private destroyRef;
mouseState$: BehaviorSubject<boolean>;
nzMenuService: MenuService;
isChildSubMenuOpen$: BehaviorSubject<boolean>;
descendantMenuItemClick$: rxjs.Subject<any>;
animationStateChange$: EventEmitter<AnimationEvent>;
nzOverlayClassName: string;
nzOverlayStyle: IndexableObject;
templateRef: TemplateRef<NzSafeAny>;
dir: Direction;
onAnimationEvent(event: AnimationEvent): void;
setMouseState(visible: boolean): void;
setValue<T extends keyof NzDropdownMenuComponent>(key: T, value: this[T]): void;
noAnimation: NzNoAnimationDirective | null;
ngOnInit(): void;
ngAfterContentInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzDropdownMenuComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzDropdownMenuComponent, "nz-dropdown-menu", ["nzDropdownMenu"], {}, {}, never, ["*"], true, never>;
}
declare class NzDropDownDirective implements AfterViewInit, OnChanges {
readonly nzConfigService: NzConfigService;
private renderer;
private viewContainerRef;
private platform;
private destroyRef;
readonly _nzModuleName: NzConfigKey;
elementRef: ElementRef<any>;
private overlay;
private portal?;
private overlayRef;
private positionStrategy;
private inputVisible$;
private nzTrigger$;
private overlayClose$;
nzDropdownMenu: NzDropdownMenuComponent | null;
nzTrigger: 'click' | 'hover';
nzMatchWidthElement: ElementRef | null;
nzBackdrop: boolean;
nzClickHide: boolean;
nzDisabled: boolean;
nzVisible: boolean;
nzOverlayClassName: string;
nzOverlayStyle: IndexableObject;
nzPlacement: NzPlacementType;
readonly nzVisibleChange: EventEmitter<boolean>;
constructor();
setDropdownMenuValue<T extends keyof NzDropdownMenuComponent>(key: T, value: NzDropdownMenuComponent[T]): void;
ngAfterViewInit(): void;
ngOnChanges(changes: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzDropDownDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NzDropDownDirective, "[nz-dropdown]", ["nzDropdown"], { "nzDropdownMenu": { "alias": "nzDropdownMenu"; "required": false; }; "nzTrigger": { "alias": "nzTrigger"; "required": false; }; "nzMatchWidthElement": { "alias": "nzMatchWidthElement"; "required": false; }; "nzBackdrop": { "alias": "nzBackdrop"; "required": false; }; "nzClickHide": { "alias": "nzClickHide"; "required": false; }; "nzDisabled": { "alias": "nzDisabled"; "required": false; }; "nzVisible": { "alias": "nzVisible"; "required": false; }; "nzOverlayClassName": { "alias": "nzOverlayClassName"; "required": false; }; "nzOverlayStyle": { "alias": "nzOverlayStyle"; "required": false; }; "nzPlacement": { "alias": "nzPlacement"; "required": false; }; }, { "nzVisibleChange": "nzVisibleChange"; }, never, never, true, never>;
static ngAcceptInputType_nzBackdrop: unknown;
static ngAcceptInputType_nzClickHide: unknown;
static ngAcceptInputType_nzDisabled: unknown;
static ngAcceptInputType_nzVisible: unknown;
}
declare class NzDropDownADirective {
static ɵfac: i0.ɵɵFactoryDeclaration<NzDropDownADirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NzDropDownADirective, "a[nz-dropdown]", never, {}, {}, never, never, true, never>;
}
/**
* @deprecated Will be removed in v21, because it is not used anymore.
*/
declare class NzDropdownButtonDirective {
static ɵfac: i0.ɵɵFactoryDeclaration<NzDropdownButtonDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NzDropdownButtonDirective, "[nz-button][nz-dropdown]", never, {}, {}, never, never, true, never>;
}
declare class NzContextMenuServiceModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzContextMenuServiceModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzContextMenuServiceModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzContextMenuServiceModule>;
}
declare class NzDropDownModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzDropDownModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzDropDownModule, never, [typeof NzDropDownDirective, typeof NzDropDownADirective, typeof NzDropdownMenuComponent, typeof NzDropdownButtonDirective, typeof NzContextMenuServiceModule], [typeof i6.NzMenuModule, typeof NzDropDownDirective, typeof NzDropDownADirective, typeof NzDropdownMenuComponent, typeof NzDropdownButtonDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzDropDownModule>;
}
declare class NzContextMenuService {
private ngZone;
private overlay;
private overlayRef;
private closeSubscription;
create($event: MouseEvent | {
x: number;
y: number;
}, nzDropdownMenuComponent: NzDropdownMenuComponent): EmbeddedViewRef<NzSafeAny>;
close(clear?: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzContextMenuService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NzContextMenuService>;
}
export { NzContextMenuService, NzContextMenuServiceModule, NzDropDownADirective, NzDropDownDirective, NzDropDownModule, NzDropdownButtonDirective, NzDropdownMenuComponent };
export type { NzPlacementType };