UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

683 lines (504 loc) 26.9 kB
import { TransferState } from '@angular/platform-browser'; import { ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core'; import DevExpress from 'devextreme/bundles/dx.all'; import Store from 'devextreme/data/abstract_store'; import DataSource, { Options as DataSourceOptions } from 'devextreme/data/data_source'; import { Properties as dxTextBoxOptions } from 'devextreme/ui/text_box'; import DxTreeView from 'devextreme/ui/tree_view'; import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core'; import { DxiItemComponent } from 'devextreme-angular/ui/nested'; import * as i0 from "@angular/core"; import * as i1 from "devextreme-angular/ui/nested"; import * as i2 from "devextreme-angular/core"; import * as i3 from "@angular/platform-browser"; export { ExplicitTypes } from 'devextreme/ui/tree_view'; /** * The TreeView UI component is a tree-like representation of textual data. */ export declare class DxTreeViewComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck { private _watcherHelper; private _idh; instance: DxTreeView; /** * Specifies the shortcut key that sets focus on the UI component. */ get accessKey(): string | undefined; set accessKey(value: string | undefined); /** * Specifies whether the UI component changes its visual state as a result of user interaction. */ get activeStateEnabled(): boolean; set activeStateEnabled(value: boolean); /** * Specifies whether or not to animate item collapsing and expanding. */ get animationEnabled(): boolean; set animationEnabled(value: boolean); /** * Allows you to load nodes on demand. */ get createChildren(): Function; set createChildren(value: Function); /** * Binds the UI component to data. */ get dataSource(): DataSource | DataSourceOptions | Store | null | string | Array<DevExpress.ui.dxTreeViewItem>; set dataSource(value: DataSource | DataSourceOptions | Store | null | string | Array<DevExpress.ui.dxTreeViewItem>); /** * Notifies the UI component of the used data structure. */ get dataStructure(): string; set dataStructure(value: string); /** * Specifies whether the UI component responds to user interaction. */ get disabled(): boolean; set disabled(value: boolean); /** * Specifies the name of the data source item field whose value defines whether or not the corresponding UI component item is disabled. */ get disabledExpr(): Function | string; set disabledExpr(value: Function | string); /** * Specifies the data field whose values should be displayed. */ get displayExpr(): Function | string; set displayExpr(value: Function | string); /** * Specifies the global attributes to be attached to the UI component&apos;s container element. */ get elementAttr(): any; set elementAttr(value: any); /** * Specifies whether or not a user can expand all tree view items by the &apos;*&apos; hot key. */ get expandAllEnabled(): boolean; set expandAllEnabled(value: boolean); /** * Specifies which data source field specifies whether an item is expanded. */ get expandedExpr(): Function | string; set expandedExpr(value: Function | string); /** * Specifies the event on which to expand/collapse a node. */ get expandEvent(): string; set expandEvent(value: string); /** * Specifies whether or not all parent nodes of an initially expanded node are displayed expanded. */ get expandNodesRecursive(): boolean; set expandNodesRecursive(value: boolean); /** * Specifies whether the UI component can be focused using keyboard navigation. */ get focusStateEnabled(): boolean; set focusStateEnabled(value: boolean); /** * Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ get hasItemsExpr(): Function | string; set hasItemsExpr(value: Function | string); /** * Specifies the UI component&apos;s height. */ get height(): number | Function | string | undefined; set height(value: number | Function | 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<DevExpress.ui.dxTreeViewItem>; set items(value: Array<DevExpress.ui.dxTreeViewItem>); /** * Specifies which data field contains nested items. */ get itemsExpr(): Function | string; set itemsExpr(value: Function | string); /** * Specifies a custom template for items. */ get itemTemplate(): any; set itemTemplate(value: any); /** * Specifies which data field provides keys for TreeView items. */ 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 the name of the data source item field for holding the parent key of the corresponding node. */ get parentIdExpr(): Function | string; set parentIdExpr(value: Function | string); /** * Specifies the parent ID value of the root item. */ get rootValue(): any; set rootValue(value: any); /** * Switches the UI component to a right-to-left representation. */ get rtlEnabled(): boolean; set rtlEnabled(value: boolean); /** * A string value specifying available scrolling directions. */ get scrollDirection(): string; set scrollDirection(value: string); /** * Configures the search panel. */ get searchEditorOptions(): dxTextBoxOptions; set searchEditorOptions(value: dxTextBoxOptions); /** * Specifies whether the search panel is visible. */ get searchEnabled(): boolean; set searchEnabled(value: boolean); /** * Specifies a data object&apos;s field name or an expression whose value is compared to the search string. */ get searchExpr(): Function | string | Array<Function | string>; set searchExpr(value: Function | string | Array<Function | string>); /** * Specifies a comparison operation used to search UI component items. */ get searchMode(): string; set searchMode(value: string); /** * Specifies a delay in milliseconds between when a user finishes typing, and the search is executed. */ get searchTimeout(): number | undefined; set searchTimeout(value: number | undefined); /** * Specifies the current search string. */ get searchValue(): string; set searchValue(value: string); /** * Specifies the text displayed at the &apos;Select All&apos; check box. */ get selectAllText(): string; set selectAllText(value: string); /** * Specifies whether an item becomes selected if a user clicks it. */ get selectByClick(): boolean; set selectByClick(value: boolean); /** * Specifies the name of the data source item field whose value defines whether or not the corresponding UI component items is selected. */ get selectedExpr(): Function | string; set selectedExpr(value: Function | string); /** * Specifies item selection mode. Applies only if selection is enabled. */ get selectionMode(): string; set selectionMode(value: string); /** * Specifies whether all child nodes should be selected when their parent node is selected. Applies only if the selectionMode is &apos;multiple&apos;. */ get selectNodesRecursive(): boolean; set selectNodesRecursive(value: boolean); /** * Specifies the checkbox display mode. */ get showCheckBoxesMode(): string; set showCheckBoxesMode(value: string); /** * Specifies the number of the element when the Tab key is used for navigating. */ get tabIndex(): number; set tabIndex(value: number); /** * Specifies whether or not the UI component uses native scrolling. */ get useNativeScrolling(): boolean; set useNativeScrolling(value: boolean); /** * Enables the virtual mode in which nodes are loaded on demand. Use it to enhance the performance on large datasets. */ get virtualModeEnabled(): boolean; set virtualModeEnabled(value: boolean); /** * Specifies whether the UI component is visible. */ get visible(): boolean; set visible(value: boolean); /** * Specifies the UI component&apos;s width. */ get width(): number | Function | string | undefined; set width(value: number | Function | string | undefined); /** * A function that is executed when the UI component is rendered and each time the component is repainted. */ onContentReady: EventEmitter<any>; /** * A function that is executed before the UI component is disposed of. */ onDisposing: EventEmitter<any>; /** * A function used in JavaScript frameworks to save the UI component instance. */ onInitialized: EventEmitter<any>; /** * A function that is executed when a collection item is clicked or tapped. */ onItemClick: EventEmitter<any>; /** * A function that is executed when a tree view item is collapsed. */ onItemCollapsed: EventEmitter<any>; /** * A function that is executed when a collection item is right-clicked or pressed. */ onItemContextMenu: EventEmitter<any>; /** * A function that is executed when a tree view item is expanded. */ onItemExpanded: EventEmitter<any>; /** * A function that is executed when a collection item has been held for a specified period. */ onItemHold: EventEmitter<any>; /** * A function that is executed after a collection item is rendered. */ onItemRendered: EventEmitter<any>; /** * A function that is executed when a single TreeView item is selected or selection is canceled. */ onItemSelectionChanged: EventEmitter<any>; /** * A function that is executed after a UI component property is changed. */ onOptionChanged: EventEmitter<any>; /** * A function that is executed when the &apos;Select All&apos; check box value is changed. Applies only if showCheckBoxesMode is &apos;selectAll&apos; and selectionMode is &apos;multiple&apos;. */ onSelectAllValueChanged: EventEmitter<any>; /** * A function that is executed when a TreeView item is selected or selection is canceled. */ onSelectionChanged: EventEmitter<any>; /** * 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. */ activeStateEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ animationEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ createChildrenChange: EventEmitter<Function>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataSourceChange: EventEmitter<DataSource | DataSourceOptions | Store | null | string | Array<DevExpress.ui.dxTreeViewItem>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataStructureChange: EventEmitter<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. */ disabledExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ displayExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ elementAttrChange: EventEmitter<any>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ expandAllEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ expandedExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ expandEventChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ expandNodesRecursiveChange: EventEmitter<boolean>; /** * 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. */ hasItemsExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ heightChange: EventEmitter<number | Function | 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<DevExpress.ui.dxTreeViewItem>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemsExprChange: EventEmitter<Function | 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. */ parentIdExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ rootValueChange: 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. */ scrollDirectionChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchEditorOptionsChange: EventEmitter<dxTextBoxOptions>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchExprChange: EventEmitter<Function | string | Array<Function | string>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchModeChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchTimeoutChange: EventEmitter<number | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ searchValueChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectAllTextChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectByClickChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectedExprChange: EventEmitter<Function | string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectionModeChange: EventEmitter<string>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ selectNodesRecursiveChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showCheckBoxesModeChange: EventEmitter<string>; /** * 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. */ useNativeScrollingChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ virtualModeEnabledChange: 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 | Function | string | undefined>; get itemsChildren(): QueryList<DxiItemComponent>; set itemsChildren(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): DxTreeView<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<DxTreeViewComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DxTreeViewComponent, "dx-tree-view", never, { "accessKey": "accessKey"; "activeStateEnabled": "activeStateEnabled"; "animationEnabled": "animationEnabled"; "createChildren": "createChildren"; "dataSource": "dataSource"; "dataStructure": "dataStructure"; "disabled": "disabled"; "disabledExpr": "disabledExpr"; "displayExpr": "displayExpr"; "elementAttr": "elementAttr"; "expandAllEnabled": "expandAllEnabled"; "expandedExpr": "expandedExpr"; "expandEvent": "expandEvent"; "expandNodesRecursive": "expandNodesRecursive"; "focusStateEnabled": "focusStateEnabled"; "hasItemsExpr": "hasItemsExpr"; "height": "height"; "hint": "hint"; "hoverStateEnabled": "hoverStateEnabled"; "itemHoldTimeout": "itemHoldTimeout"; "items": "items"; "itemsExpr": "itemsExpr"; "itemTemplate": "itemTemplate"; "keyExpr": "keyExpr"; "noDataText": "noDataText"; "parentIdExpr": "parentIdExpr"; "rootValue": "rootValue"; "rtlEnabled": "rtlEnabled"; "scrollDirection": "scrollDirection"; "searchEditorOptions": "searchEditorOptions"; "searchEnabled": "searchEnabled"; "searchExpr": "searchExpr"; "searchMode": "searchMode"; "searchTimeout": "searchTimeout"; "searchValue": "searchValue"; "selectAllText": "selectAllText"; "selectByClick": "selectByClick"; "selectedExpr": "selectedExpr"; "selectionMode": "selectionMode"; "selectNodesRecursive": "selectNodesRecursive"; "showCheckBoxesMode": "showCheckBoxesMode"; "tabIndex": "tabIndex"; "useNativeScrolling": "useNativeScrolling"; "virtualModeEnabled": "virtualModeEnabled"; "visible": "visible"; "width": "width"; }, { "onContentReady": "onContentReady"; "onDisposing": "onDisposing"; "onInitialized": "onInitialized"; "onItemClick": "onItemClick"; "onItemCollapsed": "onItemCollapsed"; "onItemContextMenu": "onItemContextMenu"; "onItemExpanded": "onItemExpanded"; "onItemHold": "onItemHold"; "onItemRendered": "onItemRendered"; "onItemSelectionChanged": "onItemSelectionChanged"; "onOptionChanged": "onOptionChanged"; "onSelectAllValueChanged": "onSelectAllValueChanged"; "onSelectionChanged": "onSelectionChanged"; "accessKeyChange": "accessKeyChange"; "activeStateEnabledChange": "activeStateEnabledChange"; "animationEnabledChange": "animationEnabledChange"; "createChildrenChange": "createChildrenChange"; "dataSourceChange": "dataSourceChange"; "dataStructureChange": "dataStructureChange"; "disabledChange": "disabledChange"; "disabledExprChange": "disabledExprChange"; "displayExprChange": "displayExprChange"; "elementAttrChange": "elementAttrChange"; "expandAllEnabledChange": "expandAllEnabledChange"; "expandedExprChange": "expandedExprChange"; "expandEventChange": "expandEventChange"; "expandNodesRecursiveChange": "expandNodesRecursiveChange"; "focusStateEnabledChange": "focusStateEnabledChange"; "hasItemsExprChange": "hasItemsExprChange"; "heightChange": "heightChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "itemHoldTimeoutChange": "itemHoldTimeoutChange"; "itemsChange": "itemsChange"; "itemsExprChange": "itemsExprChange"; "itemTemplateChange": "itemTemplateChange"; "keyExprChange": "keyExprChange"; "noDataTextChange": "noDataTextChange"; "parentIdExprChange": "parentIdExprChange"; "rootValueChange": "rootValueChange"; "rtlEnabledChange": "rtlEnabledChange"; "scrollDirectionChange": "scrollDirectionChange"; "searchEditorOptionsChange": "searchEditorOptionsChange"; "searchEnabledChange": "searchEnabledChange"; "searchExprChange": "searchExprChange"; "searchModeChange": "searchModeChange"; "searchTimeoutChange": "searchTimeoutChange"; "searchValueChange": "searchValueChange"; "selectAllTextChange": "selectAllTextChange"; "selectByClickChange": "selectByClickChange"; "selectedExprChange": "selectedExprChange"; "selectionModeChange": "selectionModeChange"; "selectNodesRecursiveChange": "selectNodesRecursiveChange"; "showCheckBoxesModeChange": "showCheckBoxesModeChange"; "tabIndexChange": "tabIndexChange"; "useNativeScrollingChange": "useNativeScrollingChange"; "virtualModeEnabledChange": "virtualModeEnabledChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; }, ["itemsChildren"], never>; } export declare class DxTreeViewModule { static ɵfac: i0.ɵɵFactoryDeclaration<DxTreeViewModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<DxTreeViewModule, [typeof DxTreeViewComponent], [typeof i1.DxiItemModule, typeof i1.DxoSearchEditorOptionsModule, typeof i1.DxiButtonModule, typeof i1.DxoOptionsModule, typeof i2.DxIntegrationModule, typeof i2.DxTemplateModule, typeof i3.BrowserTransferStateModule], [typeof DxTreeViewComponent, typeof i1.DxiItemModule, typeof i1.DxoSearchEditorOptionsModule, typeof i1.DxiButtonModule, typeof i1.DxoOptionsModule, typeof i2.DxTemplateModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<DxTreeViewModule>; }