anchor.component.d.ts 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 { Platform } from '@angular/cdk/platform';
  6. import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, Renderer2, SimpleChanges } from '@angular/core';
  7. import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
  8. import { NzScrollService } from 'ng-zorro-antd/core/services';
  9. import { NgStyleInterface, NzDirectionVHType } from 'ng-zorro-antd/core/types';
  10. import { NzAnchorLinkComponent } from './anchor-link.component';
  11. import * as i0 from "@angular/core";
  12. export declare class NzAnchorComponent implements OnDestroy, AfterViewInit, OnChanges {
  13. nzConfigService: NzConfigService;
  14. private scrollSrv;
  15. private cdr;
  16. private platform;
  17. private renderer;
  18. readonly _nzModuleName: NzConfigKey;
  19. private ink;
  20. nzAffix: boolean;
  21. nzShowInkInFixed: boolean;
  22. nzBounds: number;
  23. nzOffsetTop?: number;
  24. nzTargetOffset?: number;
  25. nzContainer?: string | HTMLElement;
  26. nzCurrentAnchor?: string;
  27. nzDirection: NzDirectionVHType;
  28. readonly nzClick: EventEmitter<string>;
  29. readonly nzChange: EventEmitter<string>;
  30. readonly nzScroll: EventEmitter<NzAnchorLinkComponent>;
  31. visible: boolean;
  32. wrapperStyle: NgStyleInterface;
  33. container?: HTMLElement | Window;
  34. activeLink?: string;
  35. private links;
  36. private animating;
  37. private destroy$;
  38. private handleScrollTimeoutID?;
  39. private doc;
  40. constructor(nzConfigService: NzConfigService, scrollSrv: NzScrollService, cdr: ChangeDetectorRef, platform: Platform, renderer: Renderer2);
  41. registerLink(link: NzAnchorLinkComponent): void;
  42. unregisterLink(link: NzAnchorLinkComponent): void;
  43. private getContainer;
  44. ngAfterViewInit(): void;
  45. ngOnDestroy(): void;
  46. private registerScrollEvent;
  47. handleScroll(): void;
  48. private clearActive;
  49. private setActive;
  50. private handleActive;
  51. private setVisible;
  52. handleScrollTo(linkComp: NzAnchorLinkComponent): void;
  53. ngOnChanges(changes: SimpleChanges): void;
  54. static ɵfac: i0.ɵɵFactoryDeclaration<NzAnchorComponent, never>;
  55. 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>;
  56. static ngAcceptInputType_nzAffix: unknown;
  57. static ngAcceptInputType_nzShowInkInFixed: unknown;
  58. static ngAcceptInputType_nzBounds: unknown;
  59. static ngAcceptInputType_nzOffsetTop: unknown;
  60. static ngAcceptInputType_nzTargetOffset: unknown;
  61. }