devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
335 lines (252 loc) • 14 kB
TypeScript
/*!
* devextreme-angular
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
import DataSource from 'devextreme/data/data_source';
import { dxActionSheetItem, CancelClickEvent, ContentReadyEvent, DisposingEvent, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, OptionChangedEvent } from 'devextreme/ui/action_sheet';
import { DataSourceOptions } from 'devextreme/data/data_source';
import { Store } from 'devextreme/data/store';
import DxActionSheet from 'devextreme/ui/action_sheet';
import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core';
import { DxiItemComponent } from 'devextreme-angular/ui/nested';
import { DxiActionSheetItemComponent } from 'devextreme-angular/ui/action-sheet/nested';
import type * as DxActionSheetTypes from "devextreme/ui/action_sheet_types";
import * as i0 from "@angular/core";
import * as i1 from "devextreme-angular/ui/nested";
import * as i2 from "devextreme-angular/ui/action-sheet/nested";
import * as i3 from "devextreme-angular/core";
export { ExplicitTypes } from 'devextreme/ui/action_sheet';
/**
* 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 declare class DxActionSheetComponent<TItem = any, TKey = any> extends DxComponent implements OnDestroy, OnChanges, DoCheck {
private _watcherHelper;
private _idh;
instance: DxActionSheet<TItem, TKey>;
/**
* The text displayed in the button that closes the action sheet.
*/
get cancelText(): string;
set cancelText(value: string);
/**
* Binds the UI component to data.
*/
get dataSource(): Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string;
set dataSource(value: Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string);
/**
* Specifies whether the UI component responds to user interaction.
*/
get disabled(): boolean;
set disabled(value: boolean);
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get elementAttr(): Record<string, any>;
set elementAttr(value: Record<string, any>);
/**
* Specifies the UI component's height.
*/
get height(): (() => number | string) | number | string | undefined;
set height(value: (() => number | string) | number | string | undefined);
/**
* Specifies text for a hint that appears when a user pauses on the UI component.
*/
get hint(): string | undefined;
set hint(value: string | undefined);
/**
* Specifies whether the UI component changes its state when a user pauses on it.
*/
get hoverStateEnabled(): boolean;
set hoverStateEnabled(value: boolean);
/**
* The time period in milliseconds before the onItemHold event is raised.
*/
get itemHoldTimeout(): number;
set itemHoldTimeout(value: number);
/**
* An array of items displayed by the UI component.
*/
get items(): Array<any | dxActionSheetItem | string>;
set items(value: Array<any | dxActionSheetItem | string>);
/**
* Specifies a custom template for items.
*/
get itemTemplate(): any;
set itemTemplate(value: any);
/**
* Switches the UI component to a right-to-left representation.
*/
get rtlEnabled(): boolean;
set rtlEnabled(value: boolean);
/**
* Specifies whether or not to display the Cancel button in action sheet.
*/
get showCancelButton(): boolean;
set showCancelButton(value: boolean);
/**
* A Boolean value specifying whether or not the title of the action sheet is visible.
*/
get showTitle(): boolean;
set showTitle(value: boolean);
/**
* Specifies the element the action sheet popover points at. Applies only if usePopover is true.
*/
get target(): any | string;
set target(value: any | string);
/**
* The title of the action sheet.
*/
get title(): string;
set title(value: string);
/**
* Specifies whether or not to show the action sheet within a Popover UI component.
*/
get usePopover(): boolean;
set usePopover(value: boolean);
/**
* A Boolean value specifying whether or not the ActionSheet UI component is visible.
*/
get visible(): boolean;
set visible(value: boolean);
/**
* Specifies the UI component's width.
*/
get width(): (() => number | string) | number | string | undefined;
set width(value: (() => number | string) | number | string | undefined);
/**
* A function that is executed when the Cancel button is clicked or tapped.
*/
onCancelClick: EventEmitter<CancelClickEvent>;
/**
* A function that is executed when the UI component is rendered and each time the component is repainted.
*/
onContentReady: EventEmitter<ContentReadyEvent>;
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<DisposingEvent>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<InitializedEvent>;
/**
* A function that is executed when a collection item is clicked or tapped.
*/
onItemClick: EventEmitter<ItemClickEvent>;
/**
* A function that is executed when a collection item is right-clicked or pressed.
*/
onItemContextMenu: EventEmitter<ItemContextMenuEvent>;
/**
* A function that is executed when a collection item has been held for a specified period.
*/
onItemHold: EventEmitter<ItemHoldEvent>;
/**
* A function that is executed after a collection item is rendered.
*/
onItemRendered: EventEmitter<ItemRenderedEvent>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<OptionChangedEvent>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
cancelTextChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
dataSourceChange: EventEmitter<Array<any | dxActionSheetItem | string> | DataSource | DataSourceOptions | null | Store | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
disabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
elementAttrChange: EventEmitter<Record<string, any>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
heightChange: EventEmitter<(() => number | string) | number | string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hintChange: EventEmitter<string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hoverStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
itemHoldTimeoutChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
itemsChange: EventEmitter<Array<any | dxActionSheetItem | string>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
itemTemplateChange: EventEmitter<any>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
rtlEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showCancelButtonChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
showTitleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
targetChange: EventEmitter<any | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
titleChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
usePopoverChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
visibleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
widthChange: EventEmitter<(() => number | string) | number | string | undefined>;
get itemsChildren(): QueryList<DxiActionSheetItemComponent>;
set itemsChildren(value: QueryList<DxiActionSheetItemComponent>);
get itemsLegacyChildren(): QueryList<DxiItemComponent>;
set itemsLegacyChildren(value: QueryList<DxiItemComponent>);
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
protected _createInstance(element: any, options: any): DxActionSheet<any, any>;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
setupChanges(prop: string, changes: SimpleChanges): void;
ngDoCheck(): void;
_setOption(name: string, value: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DxActionSheetComponent<any, any>, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DxActionSheetComponent<any, any>, "dx-action-sheet", never, { "cancelText": { "alias": "cancelText"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; }; "itemHoldTimeout": { "alias": "itemHoldTimeout"; "required": false; }; "items": { "alias": "items"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "showCancelButton": { "alias": "showCancelButton"; "required": false; }; "showTitle": { "alias": "showTitle"; "required": false; }; "target": { "alias": "target"; "required": false; }; "title": { "alias": "title"; "required": false; }; "usePopover": { "alias": "usePopover"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "onCancelClick": "onCancelClick"; "onContentReady": "onContentReady"; "onDisposing": "onDisposing"; "onInitialized": "onInitialized"; "onItemClick": "onItemClick"; "onItemContextMenu": "onItemContextMenu"; "onItemHold": "onItemHold"; "onItemRendered": "onItemRendered"; "onOptionChanged": "onOptionChanged"; "cancelTextChange": "cancelTextChange"; "dataSourceChange": "dataSourceChange"; "disabledChange": "disabledChange"; "elementAttrChange": "elementAttrChange"; "heightChange": "heightChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "itemHoldTimeoutChange": "itemHoldTimeoutChange"; "itemsChange": "itemsChange"; "itemTemplateChange": "itemTemplateChange"; "rtlEnabledChange": "rtlEnabledChange"; "showCancelButtonChange": "showCancelButtonChange"; "showTitleChange": "showTitleChange"; "targetChange": "targetChange"; "titleChange": "titleChange"; "usePopoverChange": "usePopoverChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; }, ["itemsChildren", "itemsLegacyChildren"], never, false, never>;
}
export declare class DxActionSheetModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DxActionSheetModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DxActionSheetModule, [typeof DxActionSheetComponent], [typeof i1.DxiItemModule, typeof i2.DxiActionSheetItemModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxActionSheetComponent, typeof i1.DxiItemModule, typeof i2.DxiActionSheetItemModule, typeof i3.DxTemplateModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DxActionSheetModule>;
}
export { DxActionSheetTypes };