-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packages: Add notices package (#9617)
* Packages: Add notices package Co-Authored-By: Grzegorz (Greg) Ziółkowski <[email protected]> * Notices: Add actions support Makes spokenMessage redundant by ensuring content is to be only assigned as plain string Co-Authored-By: Grzegorz (Greg) Ziółkowski <[email protected]> * Editor: Port deprecated notices action to module usage
- Loading branch information
1 parent
306cee8
commit 80f625c
Showing
47 changed files
with
1,134 additions
and
502 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
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# **core/notices**: Notices Data | ||
|
||
## Selectors | ||
|
||
### getNotices | ||
|
||
Returns all notices as an array, optionally for a given context. Defaults to | ||
the global context. | ||
|
||
*Parameters* | ||
|
||
* state: Notices state. | ||
* context: Optional grouping context. | ||
|
||
## Actions | ||
|
||
### createNotice | ||
|
||
Yields action objects used in signalling that a notice is to be created. | ||
|
||
*Parameters* | ||
|
||
* status: Notice status. | ||
Defaults to `info`. | ||
* content: Notice message. | ||
* options: Notice options. | ||
* options.context: Context under which to | ||
group notice. | ||
* options.id: Identifier for notice. | ||
Automatically assigned | ||
if not specified. | ||
* options.isDismissible: Whether the notice can | ||
be dismissed by user. | ||
Defaults to `true`. | ||
* options.actions: User actions to be | ||
presented with notice. | ||
|
||
### createSuccessNotice | ||
|
||
Returns an action object used in signalling that a success notice is to be | ||
created. Refer to `createNotice` for options documentation. | ||
|
||
*Parameters* | ||
|
||
* content: Notice message. | ||
* options: Optional notice options. | ||
|
||
### createInfoNotice | ||
|
||
Returns an action object used in signalling that an info notice is to be | ||
created. Refer to `createNotice` for options documentation. | ||
|
||
*Parameters* | ||
|
||
* content: Notice message. | ||
* options: Optional notice options. | ||
|
||
### createErrorNotice | ||
|
||
Returns an action object used in signalling that an error notice is to be | ||
created. Refer to `createNotice` for options documentation. | ||
|
||
*Parameters* | ||
|
||
* content: Notice message. | ||
* options: Optional notice options. | ||
|
||
### createWarningNotice | ||
|
||
Returns an action object used in signalling that a warning notice is to be | ||
created. Refer to `createNotice` for options documentation. | ||
|
||
*Parameters* | ||
|
||
* content: Notice message. | ||
* options: Optional notice options. | ||
|
||
### removeNotice | ||
|
||
Returns an action object used in signalling that a notice is to be removed. | ||
|
||
*Parameters* | ||
|
||
* id: Notice unique identifier. | ||
* context: Optional context (grouping) in which the notice is | ||
intended to appear. Defaults to default context. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Oops, something went wrong.