import { EventEmitter } from '@angular/core'; import { TreeListComponent as KendoTreeListComponent, AddEvent, CancelEvent, EditEvent, RemoveEvent, SaveEvent, PageChangeEvent } from '@progress/kendo-angular-treelist'; import { SortDescriptor } from '@progress/kendo-data-query'; import { TreeListNode, TreeListColumn } from './tree-list.interfaces'; import * as i0 from "@angular/core"; /** * Custom TreeList component that wraps Kendo's TreeList with design system styling. * * This component provides a hierarchical data grid for displaying and editing tabular data. * It supports selection, sorting, filtering, editing, and custom column templates. */ export declare class TreeListComponent { /** * ViewChild reference to the Kendo TreeList component instance */ treeListElement: KendoTreeListComponent; /** * The data source for the tree list */ data: TreeListNode[]; /** * Column definitions for the tree list */ columns: TreeListColumn[]; /** * Field name that contains the unique identifier for each node */ idField: string; /** * Field name that contains the child nodes array (for hierarchical binding) */ childrenField: string; /** * Field name that contains the parent identifier (for flat binding) */ parentIdField: string; /** * Binding type: 'hierarchy' for nested data with children, 'flat' for parent-child relationship data */ bindingType: 'hierarchy' | 'flat'; /** * Callback function that retrieves child nodes for a particular node (for manual binding) */ fetchChildren: ((item: any) => any[]) | undefined; /** * Callback function that determines if a particular node has children (for manual binding) */ hasChildren: ((item: any) => boolean) | undefined; /** * Callback function that determines if a particular node is expanded (for manual binding) */ isExpanded: ((item: any) => boolean) | undefined; /** * Enable selection functionality */ selectable: boolean; /** * Enable sorting functionality */ sortable: boolean; /** * Enable filtering functionality */ filterable: boolean; /** * Enable resizing functionality */ resizable: boolean; /** * Enable reordering functionality */ reorderable: boolean; /** * Enable editing functionality */ editable: boolean; /** * Loading state - shows loading indicator when true */ loading: boolean; /** * Height of the tree list container */ height: number | string; /** * Enable virtual scrolling */ scrollable: boolean; /** * Page size for pagination */ pageSize: number; /** * Enable pagination */ pageable: boolean; /** * Current sort configuration */ sort: SortDescriptor[]; /** * Custom cell template */ cellTemplate?: any; /** * Custom header template */ headerTemplate?: any; /** * Custom footer template */ footerTemplate?: any; /** * Custom edit template */ editTemplate?: any; /** * Custom command column template */ commandTemplate?: any; /** * Custom no records template */ noRecordsTemplate?: any; /** * Custom loading template */ loadingTemplate?: any; selectionChange: EventEmitter; expand: EventEmitter<{ dataItem: TreeListNode; index: string; }>; collapse: EventEmitter<{ dataItem: TreeListNode; index: string; }>; sortChange: EventEmitter; filterChange: EventEmitter; pageChange: EventEmitter; add: EventEmitter; edit: EventEmitter; cancelEvent: EventEmitter; save: EventEmitter; remove: EventEmitter; cellClick: EventEmitter; cellClose: EventEmitter; /** * Generates CSS classes for the tree-list container element based on current state. * Applies conditional classes for loading state and editing mode to enable appropriate styling. * * @returns A space-separated string of CSS class names to apply to the container */ getTreeListClasses(): string; /** * Handles selection state changes when users select or deselect tree-list rows. * Propagates the selection event to parent components for external handling. * * @param event - The selection change event containing selected items and metadata */ onSelectionChange(event: any): void; /** * Handles node expansion events when users expand collapsed hierarchical tree nodes. * Emits the expand event to notify parent components of the state change for potential data loading. * * @param event - The expand event containing the expanded node data and index information */ onExpand(event: any): void; /** * Handles node collapse events when users collapse expanded hierarchical tree nodes. * Emits the collapse event to notify parent components of the state change for cleanup or optimization. * * @param event - The collapse event containing the collapsed node data and index information */ onCollapse(event: any): void; /** * Handles column sorting changes when users click on sortable column headers. * Updates the internal sort state and propagates the change to parent components for data reordering. * * @param sort - Array of sort descriptors defining field names and sort directions (asc/desc) */ onSortChange(sort: SortDescriptor[]): void; /** * Handles filter criteria changes when users interact with column filters or search functionality. * Propagates filter events to parent components for server-side or client-side data filtering. * * @param filter - The filter object containing criteria, operators, and field specifications */ onFilterChange(filter: any): void; /** * Handles pagination navigation when users interact with pager controls. * Propagates page change events to parent components for data loading of the requested page. * * @param event - The page change event containing skip, take, and page size information */ onPageChange(event: PageChangeEvent): void; /** * Handles add/create events when users initiate creation of new tree-list items. * Propagates the add event to parent components for handling new item creation logic and validation. * * @param event - The add event containing parent item context and position information for insertion */ onAdd(event: AddEvent): void; /** * Handles edit mode activation when users enter editing mode for tree-list items. * Propagates the edit event to parent components for setting up edit state and validation rules. * * @param event - The edit event containing the item data being edited and row context */ onEdit(event: EditEvent): void; /** * Handles edit cancellation when users discard changes and exit editing mode without saving. * Propagates the cancel event to parent components for cleanup and restoring original data state. * * @param event - The cancel event containing the item data that was being edited */ onCancel(event: CancelEvent): void; /** * Handles save operations when users commit changes after editing tree-list items. * Propagates the save event to parent components for validation, persistence, and data refresh. * * @param event - The save event containing the modified item data and original values for comparison */ onSave(event: SaveEvent): void; /** * Handles delete/removal operations when users confirm deletion of tree-list items. * Propagates the remove event to parent components for confirmation dialogs and data deletion. * * @param event - The remove event containing the item data to be deleted and hierarchical context */ onRemove(event: RemoveEvent): void; /** * Handles individual cell click events within the tree-list for custom interaction handling. * Propagates cell click events to parent components for custom actions, navigation, or cell-specific logic. * * @param event - The cell click event containing cell data, coordinates, and column information */ onCellClick(event: any): void; /** * Handles cell editor close events when users exit cell editing mode. * Propagates cell close events to parent components for cleanup and state management. * * @param event - The cell close event containing editor state and any pending changes */ onCellClose(event: any): void; /** * Handles edit button clicks from command column or custom templates to initiate item editing. * Creates and emits a properly formatted EditEvent to notify parent components of edit intention. * This method bridges custom UI elements with the standard Kendo TreeList editing workflow. * * @param dataItem - The tree-list item data object to be edited */ onEditButtonClick(dataItem: any): void; /** * Handles remove button clicks from command column or custom templates to initiate item deletion. * Creates and emits a properly formatted RemoveEvent to notify parent components of deletion request. * This method bridges custom UI elements with the standard Kendo TreeList removal workflow. * * @param dataItem - The tree-list item data object to be deleted */ onRemoveButtonClick(dataItem: any): void; /** * Recursively expands all collapsible nodes in the tree-list hierarchy. * Iterates through all top-level data items and uses the Kendo TreeList API to expand each node, * which triggers cascading expansion of all child nodes. Safely handles cases where the * TreeList element is not yet initialized. */ expandAll(): void; /** * Recursively collapses all expandable nodes in the tree-list hierarchy. * Iterates through all top-level data items and uses the Kendo TreeList API to collapse each node, * which triggers cascading collapse of all child nodes. Safely handles cases where the * TreeList element is not yet initialized. */ collapseAll(): void; /** * Provides a tracking function for Angular's ngFor optimization when rendering column definitions. * Returns a unique identifier for each column to help Angular efficiently track and update * column elements during re-rendering. Falls back to array index if no field property exists. * * @param index - The array index of the column in the columns collection * @param column - The column configuration object containing field and other properties * @returns A unique identifier for the column (field name or array index) */ trackByColumn(index: number, column: TreeListColumn): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }