ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
88 lines (83 loc) • 4.14 kB
TypeScript
import * as i0 from '@angular/core';
import { OnInit, ElementRef, TemplateRef, AfterViewInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
import { NzSafeAny, NzDirectionVHType, NgStyleInterface } from 'ng-zorro-antd/core/types';
import { NzConfigService, NzConfigKey } from 'ng-zorro-antd/core/config';
declare class NzAnchorLinkComponent implements OnInit {
elementRef: ElementRef<any>;
private anchorComp;
private platform;
private renderer;
private readonly destroyRef;
nzHref: string;
nzTarget?: string;
titleStr: string | null;
titleTpl?: TemplateRef<NzSafeAny>;
nzDirection: NzDirectionVHType;
set nzTitle(value: string | TemplateRef<void>);
nzTemplate: TemplateRef<void>;
linkTitle: ElementRef<HTMLAnchorElement>;
constructor();
ngOnInit(): void;
getLinkTitleElement(): HTMLAnchorElement;
setActive(): void;
unsetActive(): void;
goToClick(e: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzAnchorLinkComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzAnchorLinkComponent, "nz-link", ["nzLink"], { "nzHref": { "alias": "nzHref"; "required": false; }; "nzTarget": { "alias": "nzTarget"; "required": false; }; "nzTitle": { "alias": "nzTitle"; "required": false; }; }, {}, ["nzTemplate"], ["*"], true, never>;
}
declare class NzAnchorComponent implements AfterViewInit, OnChanges {
nzConfigService: NzConfigService;
private scrollSrv;
private cdr;
private platform;
private renderer;
private doc;
private destroyRef;
readonly _nzModuleName: NzConfigKey;
private ink;
nzAffix: boolean;
nzShowInkInFixed: boolean;
nzBounds: number;
nzOffsetTop?: number;
nzTargetOffset?: number;
nzContainer?: string | HTMLElement;
nzCurrentAnchor?: string;
nzDirection: NzDirectionVHType;
readonly nzClick: EventEmitter<string>;
readonly nzChange: EventEmitter<string>;
readonly nzScroll: EventEmitter<NzAnchorLinkComponent>;
visible: boolean;
wrapperStyle: NgStyleInterface;
container?: HTMLElement | Window;
activeLink?: string;
private links;
private animating;
private destroy$;
private handleScrollTimeoutID?;
constructor();
registerLink(link: NzAnchorLinkComponent): void;
unregisterLink(link: NzAnchorLinkComponent): void;
private getContainer;
ngAfterViewInit(): void;
private registerScrollEvent;
handleScroll(): void;
private clearActive;
private setActive;
private handleActive;
private setVisible;
handleScrollTo(linkComp: NzAnchorLinkComponent): void;
ngOnChanges(changes: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzAnchorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzAnchorComponent, "nz-anchor", ["nzAnchor"], { "nzAffix": { "alias": "nzAffix"; "required": false; }; "nzShowInkInFixed": { "alias": "nzShowInkInFixed"; "required": false; }; "nzBounds": { "alias": "nzBounds"; "required": false; }; "nzOffsetTop": { "alias": "nzOffsetTop"; "required": false; }; "nzTargetOffset": { "alias": "nzTargetOffset"; "required": false; }; "nzContainer": { "alias": "nzContainer"; "required": false; }; "nzCurrentAnchor": { "alias": "nzCurrentAnchor"; "required": false; }; "nzDirection": { "alias": "nzDirection"; "required": false; }; }, { "nzClick": "nzClick"; "nzChange": "nzChange"; "nzScroll": "nzScroll"; }, never, ["*"], true, never>;
static ngAcceptInputType_nzAffix: unknown;
static ngAcceptInputType_nzShowInkInFixed: unknown;
static ngAcceptInputType_nzBounds: unknown;
static ngAcceptInputType_nzOffsetTop: unknown;
static ngAcceptInputType_nzTargetOffset: unknown;
}
declare class NzAnchorModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzAnchorModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzAnchorModule, never, [typeof NzAnchorComponent, typeof NzAnchorLinkComponent], [typeof NzAnchorComponent, typeof NzAnchorLinkComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzAnchorModule>;
}
export { NzAnchorComponent, NzAnchorLinkComponent, NzAnchorModule };