@progress/kendo-angular-treelist
Version:
Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.
79 lines (78 loc) • 2.4 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { EventEmitter, NgZone } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Observable } from 'rxjs';
import { EditState } from '../data/data.collection';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export type Entity = {
index: number;
group: any;
};
/**
* @hidden
*/
export type CommandAction = 'edit' | 'remove' | 'cancel' | 'save' | 'add';
/**
* @hidden
*/
export type CommandEvent = {
action: CommandAction;
formGroup?: FormGroup;
isNew?: boolean;
dataItem?: number;
parent?: any;
};
interface EditedItem {
group: FormGroup;
item: any;
}
/**
* @hidden
*/
export declare class EditService implements EditState {
ngZone: NgZone;
changes: EventEmitter<CommandEvent>;
changed: Observable<any>;
get newItemGroup(): FormGroup;
newItem: any;
idGetter: any;
private edited;
private keepEditCell;
private keepCellTimeout;
private column;
private closingCell;
private changedSource;
constructor(ngZone: NgZone);
editRow(dataItem: any, group?: any): void;
addRow(parent: any, group?: any): void;
editCell(item: any, column: any, group?: any): void;
isEditing(): boolean;
isEdited(dataItem: any): boolean;
isEditingCell(): boolean;
isEditingColumn(column: any): boolean;
isEditedColumn(column: any): boolean;
hasNew(parent?: any): boolean;
get newDataItem(): any;
close(item: any, isNew?: boolean): void;
closeCell(originalEvent?: any): boolean;
cancelCell(): void;
shouldCloseCell(): boolean;
preventCellClose(): void;
context(dataItem: any): EditedItem;
beginEdit(item: any): void;
beginAdd(parent?: any): void;
endEdit(dataItem: any, isNew: boolean): void;
save(item: any, isNew: boolean): void;
remove(dataItem: any, parent?: any): void;
private onChanged;
private get first();
static ɵfac: i0.ɵɵFactoryDeclaration<EditService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<EditService>;
}
export {};