UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

475 lines (356 loc) 19.4 kB
/*! * 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 { dxTabsItem, ContentReadyEvent, DisposingEvent, InitializedEvent, ItemClickEvent, ItemContextMenuEvent, ItemHoldEvent, ItemRenderedEvent, OptionChangedEvent, SelectionChangedEvent, SelectionChangingEvent } from 'devextreme/ui/tabs'; import { DataSourceOptions } from 'devextreme/data/data_source'; import { Store } from 'devextreme/data/store'; import { TabsIconPosition, Orientation, SingleOrMultiple, TabsStyle } from 'devextreme/common'; import DxTabs from 'devextreme/ui/tabs'; import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core'; import { DxiItemComponent } from 'devextreme-angular/ui/nested'; import { DxiTabsItemComponent } from 'devextreme-angular/ui/tabs/nested'; import type * as DxTabsTypes from "devextreme/ui/tabs_types"; import * as i0 from "@angular/core"; import * as i1 from "devextreme-angular/ui/nested"; import * as i2 from "devextreme-angular/ui/tabs/nested"; import * as i3 from "devextreme-angular/core"; export { ExplicitTypes } from 'devextreme/ui/tabs'; /** * The Tabs component is a tab strip used to switch between pages or views. This UI component is included in the TabPanel UI component, but you can use Tabs separately as well. */ export declare class DxTabsComponent<TItem = any, TKey = any> extends DxComponent implements OnDestroy, OnChanges, DoCheck { private _watcherHelper; private _idh; instance: DxTabs<TItem, TKey>; /** * Specifies the shortcut key that sets focus on the UI component. */ get accessKey(): string | undefined; set accessKey(value: string | undefined); /** * Binds the UI component to data. */ get dataSource(): Array<any | dxTabsItem | string> | DataSource | DataSourceOptions | null | Store | string; set dataSource(value: Array<any | dxTabsItem | 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&apos;s container element. */ get elementAttr(): Record<string, any>; set elementAttr(value: Record<string, any>); /** * Specifies whether the UI component can be focused using keyboard navigation. */ get focusStateEnabled(): boolean; set focusStateEnabled(value: boolean); /** * Specifies the UI component&apos;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); /** * Specifies icon position relative to the text inside the tab. */ get iconPosition(): TabsIconPosition; set iconPosition(value: TabsIconPosition); /** * 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 | dxTabsItem | string>; set items(value: Array<any | dxTabsItem | string>); /** * Specifies a custom template for items. */ get itemTemplate(): any; set itemTemplate(value: any); /** * Specifies the key property that provides key values to access data items. Each key value must be unique. */ get keyExpr(): Function | string; set keyExpr(value: Function | string); /** * Specifies the text or HTML markup displayed by the UI component if the item collection is empty. */ get noDataText(): string; set noDataText(value: string); /** * Specifies component orientation. */ get orientation(): Orientation; set orientation(value: Orientation); /** * Specifies whether to repaint only those elements whose data changed. */ get repaintChangesOnly(): boolean; set repaintChangesOnly(value: boolean); /** * Switches the UI component to a right-to-left representation. */ get rtlEnabled(): boolean; set rtlEnabled(value: boolean); /** * Specifies whether or not an end user can scroll tabs by swiping. */ get scrollByContent(): boolean; set scrollByContent(value: boolean); /** * Specifies whether or not an end user can scroll tabs. */ get scrollingEnabled(): boolean; set scrollingEnabled(value: boolean); /** * The index of the currently selected UI component item. */ get selectedIndex(): number; set selectedIndex(value: number); /** * The selected item object. */ get selectedItem(): any; set selectedItem(value: any); /** * Specifies an array of currently selected item keys. */ get selectedItemKeys(): Array<any>; set selectedItemKeys(value: Array<any>); /** * An array of currently selected item objects. */ get selectedItems(): Array<any>; set selectedItems(value: Array<any>); /** * Specifies whether the UI component enables an end user to select only a single item or multiple items. */ get selectionMode(): SingleOrMultiple; set selectionMode(value: SingleOrMultiple); /** * Specifies whether navigation buttons should be available when tabs exceed the UI component&apos;s width. */ get showNavButtons(): boolean; set showNavButtons(value: boolean); /** * Specifies the styling mode for the active tab. */ get stylingMode(): TabsStyle; set stylingMode(value: TabsStyle); /** * Specifies the number of the element when the Tab key is used for navigating. */ get tabIndex(): number; set tabIndex(value: number); /** * Specifies whether the UI component is visible. */ get visible(): boolean; set visible(value: boolean); /** * Specifies the UI component&apos;s width. */ get width(): (() => number | string) | number | string | undefined; set width(value: (() => number | string) | number | string | undefined); /** * 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>; /** * A function that is called after selection changes. */ onSelectionChanged: EventEmitter<SelectionChangedEvent>; /** * A function that is called before selection changes. */ onSelectionChanging: EventEmitter<SelectionChangingEvent>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ accessKeyChange: EventEmitter<string | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataSourceChange: EventEmitter<Array<any | dxTabsItem | 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. */ focusStateEnabledChange: EventEmitter<boolean>; /** * 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. */ iconPositionChange: EventEmitter<TabsIconPosition>; /** * 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 | dxTabsItem | 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. */ keyExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ noDataTextChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ orientationChange: EventEmitter<Orientation>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ repaintChangesOnlyChange: EventEmitter<boolean>; /** * 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. */ scrollByContentChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ scrollingEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedIndexChange: EventEmitter<number>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedItemChange: EventEmitter<any>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedItemKeysChange: EventEmitter<Array<any>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedItemsChange: EventEmitter<Array<any>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectionModeChange: EventEmitter<SingleOrMultiple>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showNavButtonsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ stylingModeChange: EventEmitter<TabsStyle>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ tabIndexChange: EventEmitter<number>; /** * 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<DxiTabsItemComponent>; set itemsChildren(value: QueryList<DxiTabsItemComponent>); 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): DxTabs<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<DxTabsComponent<any, any>, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DxTabsComponent<any, any>, "dx-tabs", never, { "accessKey": { "alias": "accessKey"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "focusStateEnabled": { "alias": "focusStateEnabled"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; }; "iconPosition": { "alias": "iconPosition"; "required": false; }; "itemHoldTimeout": { "alias": "itemHoldTimeout"; "required": false; }; "items": { "alias": "items"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "keyExpr": { "alias": "keyExpr"; "required": false; }; "noDataText": { "alias": "noDataText"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "repaintChangesOnly": { "alias": "repaintChangesOnly"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "scrollByContent": { "alias": "scrollByContent"; "required": false; }; "scrollingEnabled": { "alias": "scrollingEnabled"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "selectedItem": { "alias": "selectedItem"; "required": false; }; "selectedItemKeys": { "alias": "selectedItemKeys"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "showNavButtons": { "alias": "showNavButtons"; "required": false; }; "stylingMode": { "alias": "stylingMode"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "onContentReady": "onContentReady"; "onDisposing": "onDisposing"; "onInitialized": "onInitialized"; "onItemClick": "onItemClick"; "onItemContextMenu": "onItemContextMenu"; "onItemHold": "onItemHold"; "onItemRendered": "onItemRendered"; "onOptionChanged": "onOptionChanged"; "onSelectionChanged": "onSelectionChanged"; "onSelectionChanging": "onSelectionChanging"; "accessKeyChange": "accessKeyChange"; "dataSourceChange": "dataSourceChange"; "disabledChange": "disabledChange"; "elementAttrChange": "elementAttrChange"; "focusStateEnabledChange": "focusStateEnabledChange"; "heightChange": "heightChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "iconPositionChange": "iconPositionChange"; "itemHoldTimeoutChange": "itemHoldTimeoutChange"; "itemsChange": "itemsChange"; "itemTemplateChange": "itemTemplateChange"; "keyExprChange": "keyExprChange"; "noDataTextChange": "noDataTextChange"; "orientationChange": "orientationChange"; "repaintChangesOnlyChange": "repaintChangesOnlyChange"; "rtlEnabledChange": "rtlEnabledChange"; "scrollByContentChange": "scrollByContentChange"; "scrollingEnabledChange": "scrollingEnabledChange"; "selectedIndexChange": "selectedIndexChange"; "selectedItemChange": "selectedItemChange"; "selectedItemKeysChange": "selectedItemKeysChange"; "selectedItemsChange": "selectedItemsChange"; "selectionModeChange": "selectionModeChange"; "showNavButtonsChange": "showNavButtonsChange"; "stylingModeChange": "stylingModeChange"; "tabIndexChange": "tabIndexChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; }, ["itemsChildren", "itemsLegacyChildren"], never, false, never>; } export declare class DxTabsModule { static ɵfac: i0.ɵɵFactoryDeclaration<DxTabsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<DxTabsModule, [typeof DxTabsComponent], [typeof i1.DxiItemModule, typeof i2.DxiTabsItemModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxTabsComponent, typeof i1.DxiItemModule, typeof i2.DxiTabsItemModule, typeof i3.DxTemplateModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<DxTabsModule>; } export { DxTabsTypes };