rd-outer-component 0.0.67 → 0.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,20 @@
1
+ import { OnDestroy } from '@angular/core';
1
2
  import { NzNotificationService } from 'ng-zorro-antd/notification';
2
- import { IData } from './notification.service';
3
3
  import { DomSanitizer } from '@angular/platform-browser';
4
+ import { IData } from './notification.service';
4
5
  import * as i0 from "@angular/core";
5
- export declare class RdNotificationComponent {
6
+ export declare class RdNotificationComponent implements OnDestroy {
6
7
  private notificationService;
7
8
  private sanitizer;
8
9
  private notificationTpl;
9
10
  private closeTpl;
10
- private notification;
11
+ private notifications;
11
12
  constructor(notificationService: NzNotificationService, sanitizer: DomSanitizer);
12
13
  showNotification(data: IData): void;
13
14
  getDesc(desc: string): import("@angular/platform-browser").SafeHtml;
14
15
  onClick(data: IData): void;
16
+ private generateId;
17
+ ngOnDestroy(): void;
15
18
  static ɵfac: i0.ɵɵFactoryDeclaration<RdNotificationComponent, never>;
16
19
  static ɵcmp: i0.ɵɵComponentDeclaration<RdNotificationComponent, "app-rd-notification", never, {}, {}, never, never, false, never>;
17
20
  }
@@ -1,10 +1,15 @@
1
+ import { RdNotificationService } from './notification.service';
1
2
  import * as i0 from "@angular/core";
2
3
  import * as i1 from "./notification.component";
3
4
  import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/router";
5
- import * as i4 from "@angular/forms";
5
+ import * as i3 from "ng-zorro-antd/notification";
6
6
  export declare class RdNotificationModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<RdNotificationModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<RdNotificationModule, [typeof i1.RdNotificationComponent], [typeof i2.CommonModule, typeof i3.RouterModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule], never>;
7
+ constructor(parentModule?: RdNotificationModule);
8
+ static forRoot(): {
9
+ ngModule: typeof RdNotificationModule;
10
+ providers: (typeof RdNotificationService)[];
11
+ };
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdNotificationModule, [{ optional: true; skipSelf: true; }]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RdNotificationModule, [typeof i1.RdNotificationComponent], [typeof i2.CommonModule, typeof i3.NzNotificationModule], [typeof i1.RdNotificationComponent]>;
9
14
  static ɵinj: i0.ɵɵInjectorDeclaration<RdNotificationModule>;
10
15
  }
@@ -1,4 +1,4 @@
1
- import { ApplicationRef, Injector } from '@angular/core';
1
+ import { Injector, OnDestroy, EnvironmentInjector } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export interface IData {
4
4
  title?: string;
@@ -8,16 +8,18 @@ export interface IData {
8
8
  type: 'success' | 'warn' | 'error';
9
9
  onLinkClick?: () => void;
10
10
  }
11
- export declare class RdNotificationService {
12
- private applicationRef;
11
+ export declare class RdNotificationService implements OnDestroy {
13
12
  private injector;
14
- private notificationComponent?;
15
- constructor(applicationRef: ApplicationRef, injector: Injector);
16
- private createNotificationComponent;
17
- /**
18
- * 显示通知
19
- */
20
- show(data: IData): void;
13
+ private environmentInjector;
14
+ private static instance;
15
+ private notificationComponentRef?;
16
+ private isCreating;
17
+ constructor(injector: Injector, environmentInjector: EnvironmentInjector);
18
+ private ensureComponentCreated;
19
+ show(data: IData): Promise<void>;
20
+ ngOnDestroy(): void;
21
+ static show(data: IData): void;
22
+ private static getInstance;
21
23
  static ɵfac: i0.ɵɵFactoryDeclaration<RdNotificationService, never>;
22
24
  static ɵprov: i0.ɵɵInjectableDeclaration<RdNotificationService>;
23
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rd-outer-component",
3
- "version": "0.0.67",
3
+ "version": "0.0.68",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "15.2.10",
6
6
  "@angular/core": "15.2.10",