Methods
# static confirmation(params) → {Promise.<boolean>}
Shows a confirmation dialog before calling a given function.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Object
|
||
content |
string
|
message to show in the dialog |
|
okText |
string
|
<optional> |
caption for the OK button |
cancelText |
string
|
<optional> |
caption for the cancel button |
true
when OK is pressed, false
when cancel is pressed
Promise.<boolean>
Example
const confirmed = await confirmation({
content: "Do you really want to eat a burger?",
okText: "I really do",
cancelText: "I'll pass",
});
console.log(`Eating burger: ${confirmed ? "yes" : "no"}`);
# static hideProgress(params)
Hides the progress dialog.
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
progressId |
Big
|
Progress id from |
Example
const progressId = showProgress(); // show progress dialog
hideProgress(progressId); // hide it again
# static showDialog(params)
Shows a dialog with a message.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
params |
Object
|
|||
type |
"info"
|
"warning"
|
"error"
|
"exception"
|
type of message to show |
||
content |
string
|
message to show |
||
isModal |
boolean
|
<optional> |
false | whether the dialog will be modal or not |
Example
showDialog({
type: "warning",
content: "Let me warn you about something.",
isModal: true
});
# static showLogin(params)
Shows the login screen if it is not already shown.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
object
|
||
messageCode |
number
|
<optional> |
HTTP code triggering the login |
Example
await showLogin(401); // show login screen with indication that session has expired.
# static showProgress(params) → {Big}
Shows the progress dialog.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Object
|
||
content |
string
|
<optional> |
message to display while progress is visible |
isModal |
boolean
|
<optional> |
whether the progress should be modal |
progress id that can be passed to hideProgress
Big
Examples
Showing default progress dialog
const progressId = showProgress(); // show progress dialog
hideProgress({ progressId });
Showing a modal progress dialog with a message
const progressId = showProgress({ content: "In progress", isModal: true});
hideProgress({ progressId });