Skip to content

@jakguru/vueprint / @jakguru/vueprint/services/ui / swal

Class: swal

@jakguru/vueprint/services/ui.swal

A SweetAlert2 instance with the default settings SwalService

Properties

version

Static version: string

Defined in

src/services/ui.ts:130

Methods

argsToParams

argsToParams(params): SweetAlertOptions

Parameters

NameType
paramsSweetAlertArrayOptions | readonly [SweetAlertOptions]

Returns

SweetAlertOptions

Defined in

src/services/ui.ts:127


bindClickHandler

bindClickHandler(attribute?): void

Parameters

NameType
attribute?string

Returns

void

Defined in

src/services/ui.ts:124


clickCancel

clickCancel(): void

Returns

void

Defined in

src/services/ui.ts:111


clickConfirm

clickConfirm(): void

Returns

void

Defined in

src/services/ui.ts:109


clickDeny

clickDeny(): void

Returns

void

Defined in

src/services/ui.ts:110


close

close(result?): void

Parameters

NameType
result?Partial<SweetAlertResult<any>>

Returns

void

Defined in

src/services/ui.ts:87


disableButtons

disableButtons(): void

Returns

void

Defined in

src/services/ui.ts:105


disableInput

disableInput(): void

Returns

void

Defined in

src/services/ui.ts:115


enableButtons

enableButtons(): void

Returns

void

Defined in

src/services/ui.ts:104


enableInput

enableInput(): void

Returns

void

Defined in

src/services/ui.ts:116


fire

fire<T>(options): Promise<SweetAlertResult<Awaited<T>>>

Type parameters

NameType
Tany

Parameters

NameType
optionsSweetAlertOptions

Returns

Promise<SweetAlertResult<Awaited<T>>>

Defined in

src/services/ui.ts:76

fire<T>(title?, html?, icon?): Promise<SweetAlertResult<Awaited<T>>>

Type parameters

NameType
Tany

Parameters

NameType
title?string
html?string
icon?SweetAlertIcon

Returns

Promise<SweetAlertResult<Awaited<T>>>

Defined in

src/services/ui.ts:79


getActions

getActions(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:100


getCancelButton

getCancelButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:99


getCloseButton

getCloseButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:94


getConfirmButton

getConfirmButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:97


getContainer

getContainer(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:88


getDenyButton

getDenyButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:98


getFocusableElements

getFocusableElements(): readonly HTMLElement[]

Returns

readonly HTMLElement[]

Defined in

src/services/ui.ts:103


getFooter

getFooter(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:101


getHtmlContainer

getHtmlContainer(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:92


getIcon

getIcon(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:95


getIconContent

getIconContent(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:96


getImage

getImage(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:93


getInput

getInput(): null | HTMLInputElement

Returns

null | HTMLInputElement

Defined in

src/services/ui.ts:114


getPopup

getPopup(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:89


getProgressSteps

getProgressSteps(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:91


getTimerLeft

getTimerLeft(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:118


getTimerProgressBar

getTimerProgressBar(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:102


getTitle

getTitle(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:90


getValidationMessage

getValidationMessage(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:117


hideLoading

hideLoading(): void

Returns

void

Defined in

src/services/ui.ts:107


increaseTimer

increaseTimer(ms): undefined | number

Parameters

NameType
msnumber

Returns

undefined | number

Defined in

src/services/ui.ts:123


isLoading

isLoading(): boolean

Returns

boolean

Defined in

src/services/ui.ts:108


isTimerRunning

isTimerRunning(): undefined | boolean

Returns

undefined | boolean

Defined in

src/services/ui.ts:122


isUpdatableParameter

isUpdatableParameter(paramName): paramName is SweetAlertUpdatableParameters

Parameters

NameType
paramNamestring

Returns

paramName is SweetAlertUpdatableParameters

Defined in

src/services/ui.ts:126


isValidParameter

isValidParameter(paramName): paramName is "background" | "footer" | "html" | "input" | "template" | "title" | "validationMessage" | "width" | "text" | "icon" | "allowEscapeKey" | "allowOutsideClick" | "buttonsStyling" | "cancelButtonAriaLabel" | "cancelButtonColor" | "cancelButtonText" | "closeButtonAriaLabel" | "closeButtonHtml" | "confirmButtonAriaLabel" | "confirmButtonColor" | "confirmButtonText" | "currentProgressStep" | "customClass" | "denyButtonAriaLabel" | "denyButtonColor" | "denyButtonText" | "didClose" | "didDestroy" | "hideClass" | "iconColor" | "imageAlt" | "imageHeight" | "imageUrl" | "imageWidth" | "preConfirm" | "preDeny" | "progressSteps" | "reverseButtons" | "showCancelButton" | "showCloseButton" | "showConfirmButton" | "showDenyButton" | "titleText" | "willClose" | "inputValidator" | "iconHtml" | "backdrop" | "toast" | "target" | "padding" | "color" | "position" | "grow" | "animation" | "showClass" | "timer" | "timerProgressBar" | "heightAuto" | "allowEnterKey" | "stopKeydownPropagation" | "keydownListenerCapture" | "focusConfirm" | "focusDeny" | "focusCancel" | "returnFocus" | "loaderHtml" | "showLoaderOnConfirm" | "showLoaderOnDeny" | "inputLabel" | "inputPlaceholder" | "inputValue" | "inputOptions" | "inputAutoFocus" | "inputAutoTrim" | "inputAttributes" | "returnInputValueOnDeny" | "progressStepsDistance" | "willOpen" | "didOpen" | "didRender" | "scrollbarPadding"

Parameters

NameType
paramNamestring

Returns

paramName is "background" | "footer" | "html" | "input" | "template" | "title" | "validationMessage" | "width" | "text" | "icon" | "allowEscapeKey" | "allowOutsideClick" | "buttonsStyling" | "cancelButtonAriaLabel" | "cancelButtonColor" | "cancelButtonText" | "closeButtonAriaLabel" | "closeButtonHtml" | "confirmButtonAriaLabel" | "confirmButtonColor" | "confirmButtonText" | "currentProgressStep" | "customClass" | "denyButtonAriaLabel" | "denyButtonColor" | "denyButtonText" | "didClose" | "didDestroy" | "hideClass" | "iconColor" | "imageAlt" | "imageHeight" | "imageUrl" | "imageWidth" | "preConfirm" | "preDeny" | "progressSteps" | "reverseButtons" | "showCancelButton" | "showCloseButton" | "showConfirmButton" | "showDenyButton" | "titleText" | "willClose" | "inputValidator" | "iconHtml" | "backdrop" | "toast" | "target" | "padding" | "color" | "position" | "grow" | "animation" | "showClass" | "timer" | "timerProgressBar" | "heightAuto" | "allowEnterKey" | "stopKeydownPropagation" | "keydownListenerCapture" | "focusConfirm" | "focusDeny" | "focusCancel" | "returnFocus" | "loaderHtml" | "showLoaderOnConfirm" | "showLoaderOnDeny" | "inputLabel" | "inputPlaceholder" | "inputValue" | "inputOptions" | "inputAutoFocus" | "inputAutoTrim" | "inputAttributes" | "returnInputValueOnDeny" | "progressStepsDistance" | "willOpen" | "didOpen" | "didRender" | "scrollbarPadding"

Defined in

src/services/ui.ts:125


isVisible

isVisible(): boolean

Returns

boolean

Defined in

src/services/ui.ts:85


mixin

mixin(options): SwalService

Parameters

NameType
optionsSweetAlertOptions

Returns

SwalService

Defined in

src/services/ui.ts:84


resetValidationMessage

resetValidationMessage(): void

Returns

void

Defined in

src/services/ui.ts:113


resumeTimer

resumeTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:120


showLoading

showLoading(buttonToReplace?): void

Parameters

NameType
buttonToReplace?null | HTMLButtonElement

Returns

void

Defined in

src/services/ui.ts:106


showValidationMessage

showValidationMessage(validationMessage): void

Parameters

NameType
validationMessagestring

Returns

void

Defined in

src/services/ui.ts:112


stopTimer

stopTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:119


toggleTimer

toggleTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:121


update

update(options): void

Parameters

NameType
optionsPick<SweetAlertOptions, SweetAlertUpdatableParameters>

Returns

void

Defined in

src/services/ui.ts:86

Vueprint is a commercial work product released under the MIT License and is provided as-is with no warranty or guarantee of support.