Skip to content

@jakguru/vueprint / @jakguru/vueprint/services/ui / toast

Class: toast

@jakguru/vueprint/services/ui.toast

A SweetAlert2 instance with the default settings for toasts ToastService

Properties

version

Static version: string

Defined in

src/services/ui.ts:187

Methods

argsToParams

argsToParams(params): SweetAlertOptions

Parameters

NameType
paramsSweetAlertArrayOptions | readonly [SweetAlertOptions]

Returns

SweetAlertOptions

Defined in

src/services/ui.ts:184


bindClickHandler

bindClickHandler(attribute?): void

Parameters

NameType
attribute?string

Returns

void

Defined in

src/services/ui.ts:181


clickCancel

clickCancel(): void

Returns

void

Defined in

src/services/ui.ts:168


clickConfirm

clickConfirm(): void

Returns

void

Defined in

src/services/ui.ts:166


clickDeny

clickDeny(): void

Returns

void

Defined in

src/services/ui.ts:167


close

close(result?): void

Parameters

NameType
result?Partial<SweetAlertResult<any>>

Returns

void

Defined in

src/services/ui.ts:144


disableButtons

disableButtons(): void

Returns

void

Defined in

src/services/ui.ts:162


disableInput

disableInput(): void

Returns

void

Defined in

src/services/ui.ts:172


enableButtons

enableButtons(): void

Returns

void

Defined in

src/services/ui.ts:161


enableInput

enableInput(): void

Returns

void

Defined in

src/services/ui.ts:173


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:133

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:136


getActions

getActions(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:157


getCancelButton

getCancelButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:156


getCloseButton

getCloseButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:151


getConfirmButton

getConfirmButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:154


getContainer

getContainer(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:145


getDenyButton

getDenyButton(): null | HTMLButtonElement

Returns

null | HTMLButtonElement

Defined in

src/services/ui.ts:155


getFocusableElements

getFocusableElements(): readonly HTMLElement[]

Returns

readonly HTMLElement[]

Defined in

src/services/ui.ts:160


getFooter

getFooter(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:158


getHtmlContainer

getHtmlContainer(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:149


getIcon

getIcon(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:152


getIconContent

getIconContent(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:153


getImage

getImage(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:150


getInput

getInput(): null | HTMLInputElement

Returns

null | HTMLInputElement

Defined in

src/services/ui.ts:171


getPopup

getPopup(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:146


getProgressSteps

getProgressSteps(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:148


getTimerLeft

getTimerLeft(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:175


getTimerProgressBar

getTimerProgressBar(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:159


getTitle

getTitle(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:147


getValidationMessage

getValidationMessage(): null | HTMLElement

Returns

null | HTMLElement

Defined in

src/services/ui.ts:174


hideLoading

hideLoading(): void

Returns

void

Defined in

src/services/ui.ts:164


increaseTimer

increaseTimer(ms): undefined | number

Parameters

NameType
msnumber

Returns

undefined | number

Defined in

src/services/ui.ts:180


isLoading

isLoading(): boolean

Returns

boolean

Defined in

src/services/ui.ts:165


isTimerRunning

isTimerRunning(): undefined | boolean

Returns

undefined | boolean

Defined in

src/services/ui.ts:179


isUpdatableParameter

isUpdatableParameter(paramName): paramName is SweetAlertUpdatableParameters

Parameters

NameType
paramNamestring

Returns

paramName is SweetAlertUpdatableParameters

Defined in

src/services/ui.ts:183


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:182


isVisible

isVisible(): boolean

Returns

boolean

Defined in

src/services/ui.ts:142


mixin

mixin(options): ToastService

Parameters

NameType
optionsSweetAlertOptions

Returns

ToastService

Defined in

src/services/ui.ts:141


resetValidationMessage

resetValidationMessage(): void

Returns

void

Defined in

src/services/ui.ts:170


resumeTimer

resumeTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:177


showLoading

showLoading(buttonToReplace?): void

Parameters

NameType
buttonToReplace?null | HTMLButtonElement

Returns

void

Defined in

src/services/ui.ts:163


showValidationMessage

showValidationMessage(validationMessage): void

Parameters

NameType
validationMessagestring

Returns

void

Defined in

src/services/ui.ts:169


stopTimer

stopTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:176


toggleTimer

toggleTimer(): undefined | number

Returns

undefined | number

Defined in

src/services/ui.ts:178


update

update(options): void

Parameters

NameType
optionsPick<SweetAlertOptions, SweetAlertUpdatableParameters>

Returns

void

Defined in

src/services/ui.ts:143

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