Ui
Last updated
Last updated
User interface manipulation and handling
Show a notification
Display a dialog with the specified content.
Supported dialog actions:
`dialog:enablePrimaryBtn`Enables the primary button
See: component/dialogComponent
Display a Auth dialog (401/402) above any other dialogs.
Display a number of messages and different options depending on the severity on each message. Messages can be of type info, warning or error.
If there are error messages the user will not be able to continue. If there are warnings the user can continue but suggested to cancel. If only info messages only a continue is possible.
Display a simple confirmation dialog
Renders a supplied component in a screen-wide panel which smoothly animates from the bottom of the screen.
Deprecated
Deprecated, use import {UIComponent} from 'writer'
statements for UIComponents instead
Param
Type
Description
name
string
Required - The plugin ID of the plugin that sent the notification
title
string
Required - Notification title
message
string
Required - Notification message
sticky
boolean
Required - Optional, default false, if true notification stays till user closes it
`dialog:disablePrimaryBtn`Disables the primary button
Param
Type
Description
contentComponent
*
Required - A substance component or tool that will be rendered inside the dialog
props
Object
Required - A object that will be passed as props to contentComponent
options
Component.DialogComponent.Options
Required - Options passed to dialog
options.title
string
Dialog title
options.primary
string
| boolean
Primary button caption, default is i18n representation of Ok, set to false to disable button
options.secondary
string
| boolean
Secondary button caption, default is i18n representation of Cancel, set to false to disable button
options.tertiary
string
| Object
Third button
options.center
boolean
As default the dialog is centered over the editor area, set to true to center over the full writer
Param
Type
Description
authComponent
*
Required - A substance component or tool that will be rendered inside the dialog
authProps
Object
Required - A object that will be passed as props to contentComponent
authOptions
Component.DialogComponent.Options
Required - Options passed to dialog
authOptions.title
string
Dialog title
authOptions.primary
string
| boolean
Primary button caption, default is i18n representation of Ok, set to false to disable button
authOptions.secondary
string
| boolean
Secondary button caption, default is i18n representation of Cancel, set to false to disable button
authOptions.tertiary
string
| Object
Third button
authOptions.center
boolean
As default the dialog is centered over the editor area, set to true to center over the full writer
Param
Type
Description
messages
array
Required - An array of message objects. Each object have the properties type (string: info, warning, error), plugin (string: the plugin name) and message (string)
cbContinue
function
Required - Callback function for when the user press continue
cbCancel
function
Required - Callback function for when the user press cancel
heading
string
Additional text to display above the messages
Param
Type
Description
title
string
Required - dialog heading
message
string
Required - dialog message
buttons
object
Required - object with primary/secondary objects for button specifics
Param
Type
Default
Description
pluginName
string
Required - Name of plugin that called the function
component
string
Required - Component class to be rendered in the Panel
props
object
Object which is sent as props to the component class. Defaults to empty object.
sticky
boolean
false
Set to true to prevent Panel from closing when clicking outside of the Panel. Defaults to false.