image.directive.d.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 { Direction, Directionality } from '@angular/cdk/bidi';
  6. import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
  7. import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
  8. import { NzImageService } from './image.service';
  9. import * as i0 from "@angular/core";
  10. export type ImageStatusType = 'error' | 'loading' | 'normal';
  11. export type NzImageUrl = string;
  12. export type NzImageScaleStep = number;
  13. export declare class NzImageDirective implements OnInit, OnChanges, OnDestroy {
  14. nzConfigService: NzConfigService;
  15. private elementRef;
  16. private nzImageService;
  17. protected cdr: ChangeDetectorRef;
  18. private directionality;
  19. readonly _nzModuleName: NzConfigKey;
  20. nzSrc: string;
  21. nzSrcset: string;
  22. nzDisablePreview: boolean;
  23. nzFallback: string | null;
  24. nzPlaceholder: string | null;
  25. nzScaleStep: number | null;
  26. dir?: Direction;
  27. backLoadImage: HTMLImageElement;
  28. status: ImageStatusType;
  29. private backLoadDestroy$;
  30. private destroy$;
  31. private document;
  32. private parentGroup;
  33. get previewable(): boolean;
  34. constructor(nzConfigService: NzConfigService, elementRef: ElementRef, nzImageService: NzImageService, cdr: ChangeDetectorRef, directionality: Directionality);
  35. ngOnInit(): void;
  36. ngOnDestroy(): void;
  37. onPreview(): void;
  38. getElement(): ElementRef<HTMLImageElement>;
  39. ngOnChanges(changes: SimpleChanges): void;
  40. /**
  41. * use internal Image object handle fallback & placeholder
  42. *
  43. * @private
  44. */
  45. private backLoad;
  46. static ɵfac: i0.ɵɵFactoryDeclaration<NzImageDirective, never>;
  47. static ɵdir: i0.ɵɵDirectiveDeclaration<NzImageDirective, "img[nz-image]", ["nzImage"], { "nzSrc": { "alias": "nzSrc"; "required": false; }; "nzSrcset": { "alias": "nzSrcset"; "required": false; }; "nzDisablePreview": { "alias": "nzDisablePreview"; "required": false; }; "nzFallback": { "alias": "nzFallback"; "required": false; }; "nzPlaceholder": { "alias": "nzPlaceholder"; "required": false; }; "nzScaleStep": { "alias": "nzScaleStep"; "required": false; }; }, {}, never, never, true, never>;
  48. static ngAcceptInputType_nzDisablePreview: unknown;
  49. }