forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:message,notification): add close event
close NG-ZORRO#2458
- Loading branch information
Wendell
committed
Feb 22, 2019
1 parent
ffb6665
commit 90d1371
Showing
8 changed files
with
61 additions
and
18 deletions.
There are no files selected for viewing
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,20 +1,30 @@ | ||
import { Observable, Subject } from 'rxjs'; | ||
|
||
export type NzMessageType = 'success' | 'info' | 'warning' | 'error' | 'loading'; | ||
|
||
export interface NzMessageDataOptions { | ||
nzDuration?: number; | ||
nzAnimate?: boolean; | ||
nzPauseOnHover?: boolean; | ||
} | ||
|
||
// Message data for terminal users | ||
/** | ||
* Message data for terminal users. | ||
*/ | ||
export interface NzMessageData { | ||
// TODO: remove the literal parts as it's widened anyway | ||
type?: 'success' | 'info' | 'warning' | 'error' | 'loading' | string; | ||
type?: NzMessageType | string; | ||
content?: string; | ||
} | ||
|
||
// Filled version of NzMessageData (includes more private properties) | ||
/** | ||
* Filled version of NzMessageData (includes more private properties). | ||
*/ | ||
export interface NzMessageDataFilled extends NzMessageData { | ||
messageId: string; // Service-wide unique id, auto generated | ||
state?: 'enter' | 'leave'; | ||
messageId: string; | ||
createdAt: Date; | ||
|
||
options?: NzMessageDataOptions; | ||
createdAt: Date; // Auto created | ||
state?: 'enter' | 'leave'; | ||
onClose?: Subject<void>; | ||
onClick?: Subject<MouseEvent>; | ||
} |
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
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