Skip to content

DialogUI

Description

Initializes the dialog UI with an overlay container, RTL layout flag, and an optional HTML sanitizer, then installs the DOM structure.

Methods

destroyDialog

Source code

dialogUI.destroyDialog()

Removes the dialog UI elements from the DOM and clears the refs.

focusDialog

Source code

dialogUI.focusDialog()

Focuses the dialog element.

getContainer

Source code

dialogUI.getContainer() ⇒ HTMLElement

Returns the dialog element.

Returns: HTMLElement - The dialog element.

getFocusableElements

Source code

dialogUI.getFocusableElements() ⇒ Array<HTMLElement>

Gets the focusable elements.

Returns: Array<HTMLElement> - The focusable elements.

hideDialog

Source code

dialogUI.hideDialog(animation) ⇒ DialogUI

Hides the dialog with optional animation.

ParamTypeDescription
animationbooleanWhether to add the animation class to the dialog.

Returns: DialogUI - The instance of the DialogUI.

install

Source code

dialogUI.install()

Creates the dialog UI elements and sets up the structure.

showDialog

Source code

dialogUI.showDialog(animation) ⇒ DialogUI

Shows the dialog with optional animation.

ParamTypeDescription
animationbooleanWhether to add the animation class to the dialog.

Returns: DialogUI - The instance of the DialogUI.

updateDialog

Source code

dialogUI.updateDialog(options) ⇒ DialogUI

Updates the dialog content and class name.

ParamTypeDescription
optionsobjectClass name update options.
options.isVisiblebooleanWhether the dialog is visible.
options.contentstring
HTMLElement
The content to render in the dialog.
options.customClassNamestringThe custom class name to add to the dialog.
options.backgroundstringThe background to add to the dialog.
options.contentBackgroundbooleanWhether to show content background.
options.animationbooleanWhether to add the animation class to the dialog.
options.a11yobjectThe accessibility options for the dialog.

Returns: DialogUI - The instance of the DialogUI.

updateWidth

Source code

dialogUI.updateWidth(width) ⇒ DialogUI

Updates the width of the dialog container to the same size as the table.

ParamTypeDescription
widthnumberThe width of the table.

Returns: DialogUI - The instance of the DialogUI.

useDefaultTemplate

Source code

dialogUI.useDefaultTemplate()

Uses the default template for the dialog for the content option.

useTemplate

Source code

dialogUI.useTemplate(templateName, templateVars)

Uses the specified template for the dialog.

ParamTypeDescription
templateNamestringThe name of the template to use.
templateVarsobjectThe variables to use for the template.