/** * DevExtreme (ui/accordion.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 { UserDefinedElement, DxElement, } from '../core/element'; import { template, } from '../core/templates/template'; import { DxPromise, } from '../core/utils/deferred'; import DataSource, { DataSourceOptions, } from '../data/data_source'; import Store from '../data/abstract_store'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo, ItemInfo, } from '../events/index'; import CollectionWidget, { CollectionWidgetItem, CollectionWidgetOptions, SelectionChangedInfo, } from './collection/ui.collection_widget.base'; /** @public */ export type ContentReadyEvent = EventInfo; /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type ItemClickEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemContextMenuEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemHoldEvent = NativeEventInfo & ItemInfo; /** @public */ export type ItemRenderedEvent = EventInfo & ItemInfo; /** @public */ export type ItemTitleClickEvent = NativeEventInfo & ItemInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type SelectionChangedEvent = EventInfo & SelectionChangedInfo; /** * @deprecated use Properties instead * @namespace DevExpress.ui */ export interface dxAccordionOptions extends CollectionWidgetOptions { /** * @docid * @default 300 * @default 200 &for(Material) * @public */ animationDuration?: number; /** * @docid * @default false * @public */ collapsible?: boolean; /** * @docid * @type string | Array | Store | DataSource | DataSourceOptions * @default null * @public */ dataSource?: string | Array | Store | DataSource | DataSourceOptions; /** * @docid * @default true * @public */ deferRendering?: boolean; /** * @docid * @default true &for(desktop) * @public */ focusStateEnabled?: boolean; /** * @docid * @default undefined * @public */ height?: number | string | (() => number | string); /** * @docid * @default true * @public */ hoverStateEnabled?: boolean; /** * @docid * @default "item" * @type_function_param1 itemData:object * @type_function_return string|Element|jQuery * @public */ itemTemplate?: template | ((itemData: any, itemIndex: number, itemElement: DxElement) => string | UserDefinedElement); /** * @docid * @default "title" * @type_function_param1 itemData:object * @type_function_return string|Element|jQuery * @public */ itemTitleTemplate?: template | ((itemData: any, itemIndex: number, itemElement: DxElement) => string | UserDefinedElement); /** * @docid * @type Array * @fires dxAccordionOptions.onOptionChanged * @public */ items?: Array; /** * @docid * @default false * @public */ multiple?: boolean; /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field4 itemData:object * @type_function_param1_field5 itemElement:DxElement * @type_function_param1_field6 itemIndex:number * @type_function_param1_field7 event:event * @type_function_param1_field1 component:dxAccordion * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @action * @public */ onItemTitleClick?: ((e: ItemTitleClickEvent) => void) | string; /** * @docid * @default false * @public */ repaintChangesOnly?: boolean; /** * @docid * @default 0 * @public */ selectedIndex?: number; } /** * @docid * @inherits CollectionWidget * @namespace DevExpress.ui * @public */ export default class dxAccordion extends CollectionWidget { constructor(element: UserDefinedElement, options?: dxAccordionOptions) /** * @docid * @publicName collapseItem(index) * @param1 index:numeric * @return Promise * @public */ collapseItem(index: number): DxPromise; /** * @docid * @publicName expandItem(index) * @param1 index:numeric * @return Promise * @public */ expandItem(index: number): DxPromise; /** * @docid * @publicName updateDimensions() * @return Promise * @public */ updateDimensions(): DxPromise; } /** * @public * @namespace DevExpress.ui.dxAccordion */ export type Item = dxAccordionItem; /** * @deprecated Use Item instead * @namespace DevExpress.ui */ export interface dxAccordionItem extends CollectionWidgetItem { /** * @docid * @public */ icon?: string; /** * @docid * @public */ title?: string; } /** @public */ export type Properties = dxAccordionOptions; /** @deprecated use Properties instead */ export type Options = dxAccordionOptions; /** @deprecated use Properties instead */ export type IOptions = dxAccordionOptions;