notification.service.d.ts 2.1 KB

123456789101112131415161718192021222324252627282930
  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 { Overlay } from '@angular/cdk/overlay';
  6. import { Injector, TemplateRef } from '@angular/core';
  7. import type { NzSafeAny } from 'ng-zorro-antd/core/types';
  8. import { NzMNService } from 'ng-zorro-antd/message';
  9. import { NzNotificationContainerComponent } from './notification-container.component';
  10. import type { NzNotificationComponent } from './notification.component';
  11. import { NzNotificationContentType, NzNotificationDataOptions, NzNotificationRef } from './typings';
  12. import * as i0 from "@angular/core";
  13. export declare class NzNotificationService extends NzMNService<NzNotificationContainerComponent> {
  14. protected componentPrefix: string;
  15. constructor(overlay: Overlay, injector: Injector);
  16. success(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  17. error(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  18. info(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  19. warning(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  20. blank(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  21. create(type: 'success' | 'info' | 'warning' | 'error' | 'blank' | string, title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
  22. template(template: TemplateRef<{
  23. $implicit: NzNotificationComponent;
  24. data: NzSafeAny;
  25. }>, options?: NzNotificationDataOptions): NzNotificationRef;
  26. protected generateMessageId(): string;
  27. private createInstance;
  28. static ɵfac: i0.ɵɵFactoryDeclaration<NzNotificationService, never>;
  29. static ɵprov: i0.ɵɵInjectableDeclaration<NzNotificationService>;
  30. }