/** * DevExtreme (ui/toast.d.ts) * Version: 21.1.7 * Build date: Thu Aug 07 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { animationConfig, } from '../animation/fx'; import { positionConfig, } from '../animation/position'; import { UserDefinedElement, } from '../core/element'; import { DxEvent, Cancelable, EventInfo, InitializedEventInfo, ChangedOptionInfo, } from '../events/index'; import dxOverlay, { dxOverlayAnimation, dxOverlayOptions, } from './overlay'; /** @public */ export type ContentReadyEvent = EventInfo; /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type HidingEvent = Cancelable & EventInfo; /** @public */ export type HiddenEvent = EventInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type ShowingEvent = EventInfo; /** @public */ export type ShownEvent = EventInfo; /** * @deprecated use Properties instead * @namespace DevExpress.ui */ export interface dxToastOptions extends dxOverlayOptions { /** * @docid * @default { show: { type: "fade", duration: 400, from: 0, to: 1 }, hide: { type: "fade", duration: 400, to: 0 } } * @default {show: {type: 'slide', duration: 200, from: { position: {my: 'top', at: 'bottom', of: window}}}, hide: { type: 'slide', duration: 200, to: { position: {my: 'top', at: 'bottom', of: window}}}} &for(Android) * @public * @type object */ animation?: dxToastAnimation; /** * @docid * @default false * @public */ closeOnClick?: boolean; /** * @docid * @type_function_param1 event:event * @default true &for(Android) * @public */ closeOnOutsideClick?: boolean | ((event: DxEvent) => boolean); /** * @docid * @default true * @public */ closeOnSwipe?: boolean; /** * @docid * @default 2000 * @default 4000 &for(Material) * @public */ displayTime?: number; /** * @docid * @default 'auto' * @public */ height?: number | string | (() => number | string); /** * @docid * @default 568 &for(Material) * @public */ maxWidth?: number | string | (() => number | string); /** * @docid * @default "" * @public */ message?: string; /** * @docid * @default 344 &for(Material) * @public */ minWidth?: number | string | (() => number | string); /** * @docid * @default "bottom center" * @default { at: 'bottom left', my: 'bottom left', offset: '20 -20'} &for(Android) * @default { at: 'bottom center', my: 'bottom center', offset: '0 0' } &for(phones_on_Android) * @public */ position?: positionConfig | string; /** * @docid * @default false * @public */ shading?: boolean; /** * @docid * @type Enums.ToastType * @default 'info' * @public */ type?: 'custom' | 'error' | 'info' | 'success' | 'warning'; /** * @docid * @default function() {return $(window).width() * 0.8 } * @default 'auto' &for(Android) * @default function() { return $(window).width(); } &for(phones_on_Android) * @public */ width?: number | string | (() => number | string); } /** @namespace DevExpress.ui */ export interface dxToastAnimation extends dxOverlayAnimation { /** * @docid dxToastOptions.animation.hide * @default { type: "fade", duration: 400, to: 0 } * @public */ hide?: animationConfig; /** * @docid dxToastOptions.animation.show * @default { type: "fade", duration: 400, from: 0, to: 1 } * @public */ show?: animationConfig; } /** * @docid * @inherits dxOverlay * @namespace DevExpress.ui * @public */ export default class dxToast extends dxOverlay { constructor(element: UserDefinedElement, options?: dxToastOptions) } /** @public */ export type Properties = dxToastOptions; /** @deprecated use Properties instead */ export type Options = dxToastOptions; /** @deprecated use Properties instead */ export type IOptions = dxToastOptions;