-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: remove useless DialogService and TooltipService
- Loading branch information
Showing
26 changed files
with
3,914 additions
and
927 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './message-box-dialog.component'; | ||
export * from './message-box-dialog.service'; | ||
export * from './message-box-dialog.model'; | ||
export * from './message-box-dialog.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
projects/message-box-dialog/src/message-box-dialog.module.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export * from './status-detail'; | ||
|
||
export * from './status.module'; | ||
export * from './status.component'; | ||
export * from './status.service'; | ||
export * from './status.model'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './status-detail.module'; | ||
export * from './status-detail.component'; | ||
export * from './status-detail-dialog.service'; |
34 changes: 20 additions & 14 deletions
34
projects/status/src/status-detail/status-detail-dialog.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
import { Injectable, Type } from '@angular/core'; | ||
import { MatDialogConfig } from '@angular/material/dialog'; | ||
import { NgxAbstractLazyModule, NgxDialogService } from '@hug/ngx-core'; | ||
import { inject, Injectable } from '@angular/core'; | ||
import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; | ||
import { from, Observable, switchMap, take } from 'rxjs'; | ||
|
||
import { NgxStatus } from '../status.model'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NgxStatusDetailDialogService extends NgxDialogService<void, NgxStatus> { | ||
public constructor() { | ||
super({ | ||
disableClose: false, | ||
hasBackdrop: true, | ||
width: '700px', | ||
panelClass: 'ngx-status-panel' | ||
} as MatDialogConfig<NgxStatus>); | ||
} | ||
export class NgxStatusDetailDialogService { | ||
private dialog = inject(MatDialog); | ||
|
||
public open$(dialogData: NgxStatus): Observable<void | undefined> { | ||
return from(import('./status-detail.component')).pipe( | ||
take(1), | ||
switchMap(dialogComponent => { | ||
const dialogConfig = { | ||
disableClose: false, | ||
hasBackdrop: true, | ||
width: '700px', | ||
panelClass: 'ngx-status-panel', | ||
data: dialogData | ||
} as MatDialogConfig<NgxStatus>; | ||
|
||
protected getModule(): Promise<Type<NgxAbstractLazyModule<unknown>>> { | ||
return import('./status-detail.module').then(m => m.NgxStatusDetailModule); | ||
return this.dialog.open<unknown, NgxStatus, void>(dialogComponent.NgxStatusDetailComponent, dialogConfig).afterClosed(); | ||
}) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.