/** * DevExtreme (ui/action_sheet.d.ts) * Version: 25.1.7 * Build date: Mon Nov 10 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { DataSourceLike } from '../data/data_source'; import { UserDefinedElement, } from '../core/element'; import { DxPromise, } from '../core/utils/deferred'; import { Cancelable, EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, PointerInteractionEvent, } from '../events'; import CollectionWidget, { CollectionWidgetItem, CollectionWidgetOptions, } from './collection/ui.collection_widget.base'; import { ButtonType, ButtonStyle, } from '../common'; type ItemLike = string | Item | any; export { ButtonType, ButtonStyle, }; /** * The type of the cancelClick event handler's argument. */ export type CancelClickEvent = any, TKey = any> = Cancelable & EventInfo>; /** * The type of the contentReady event handler's argument. */ export type ContentReadyEvent = any, TKey = any> = EventInfo>; /** * The type of the disposing event handler's argument. */ export type DisposingEvent = any, TKey = any> = EventInfo>; /** * The type of the initialized event handler's argument. */ export type InitializedEvent = any, TKey = any> = InitializedEventInfo>; /** * The type of the itemClick event handler's argument. */ export type ItemClickEvent = any, TKey = any> = NativeEventInfo, KeyboardEvent | MouseEvent | PointerEvent> & ItemInfo; /** * The type of the itemContextMenu event handler's argument. */ export type ItemContextMenuEvent = any, TKey = any> = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemHold event handler's argument. */ export type ItemHoldEvent = any, TKey = any> = NativeEventInfo, PointerInteractionEvent> & ItemInfo; /** * The type of the itemRendered event handler's argument. */ export type ItemRenderedEvent = any, TKey = any> = EventInfo> & ItemInfo; /** * The type of the optionChanged event handler's argument. */ export type OptionChangedEvent = any, TKey = any> = EventInfo> & ChangedOptionInfo; /** * * @deprecated */ export interface dxActionSheetOptions< TItem extends ItemLike = any, TKey = any, > extends CollectionWidgetOptions, TItem, TKey> { /** * The text displayed in the button that closes the action sheet. */ cancelText?: string; /** * Binds the UI component to data. */ dataSource?: DataSourceLike | null; /** * An array of items displayed by the UI component. */ items?: Array; /** * A function that is executed when the Cancel button is clicked or tapped. */ onCancelClick?: ((e: CancelClickEvent) => void) | string; /** * Specifies whether or not to display the Cancel button in action sheet. */ showCancelButton?: boolean; /** * A Boolean value specifying whether or not the title of the action sheet is visible. */ showTitle?: boolean; /** * Specifies the element the action sheet popover points at. Applies only if usePopover is true. */ target?: string | UserDefinedElement; /** * The title of the action sheet. */ title?: string; /** * Specifies whether or not to show the action sheet within a Popover UI component. */ usePopover?: boolean; /** * A Boolean value specifying whether or not the ActionSheet UI component is visible. */ visible?: boolean; } /** * The ActionSheet UI component is a sheet containing a set of buttons located one under the other. These buttons usually represent several choices relating to a single task. */ export default class dxActionSheet< TItem extends ItemLike = any, TKey = any, > extends CollectionWidget, TItem, TKey> { /** * Hides the UI component. */ hide(): DxPromise; /** * Shows the UI component. */ show(): DxPromise; /** * Shows or hides the UI component depending on the argument. */ toggle(showing: boolean): DxPromise; } export type Item = dxActionSheetItem; /** * @deprecated Use Item instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export interface dxActionSheetItem extends CollectionWidgetItem { /** * Specifies the icon to be displayed on the action sheet button. */ icon?: string; /** * A handler for the click event raised for the button representing the given action sheet button. */ onClick?: ((e: NativeEventInfo, MouseEvent | PointerEvent>) => void) | string; /** * Specifies the type of the button that is an action sheet item. */ type?: ButtonType | string; /** * Specifies which style to apply to the button that is an action sheet item. */ stylingMode?: ButtonStyle; } export type ExplicitTypes< TItem extends ItemLike, TKey, > = { Properties: Properties; CancelClickEvent: CancelClickEvent; ContentReadyEvent: ContentReadyEvent; DisposingEvent: DisposingEvent; InitializedEvent: InitializedEvent; ItemClickEvent: ItemClickEvent; ItemContextMenuEvent: ItemContextMenuEvent; ItemHoldEvent: ItemHoldEvent; ItemRenderedEvent: ItemRenderedEvent; OptionChangedEvent: OptionChangedEvent; }; export type Properties< TItem extends ItemLike = any, TKey = any, > = dxActionSheetOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. */ export type Options< TItem extends ItemLike = any, TKey = any, > = Properties;