ngx-tree-dnd
Version:
Angular 7 support tree with drag-and-drop sortable data tree. It`s fast and smart.
44 lines (43 loc) • 1.13 kB
TypeScript
export interface TreeModel {
name: string;
id: number;
options?: TreeItemOptions;
childrens: TreeModel[];
}
export interface TreeItemOptions {
href?: string;
hidden?: boolean;
hideChildrens?: boolean;
draggable?: boolean;
position?: number;
edit?: boolean;
disabled?: boolean;
showDropChildZone?: boolean;
showActionButtons?: boolean;
showDeleteButton?: boolean;
showExpandButton?: boolean;
currentlyDragging?: boolean;
destenationTop?: boolean;
destenationBottom?: boolean;
}
export interface TreeConfig {
showActionButtons?: boolean;
showAddButtons?: boolean;
showRenameButtons?: boolean;
showDeleteButtons?: boolean;
enableExpandButtons?: boolean;
showRootActionButtons?: boolean;
enableDragging?: boolean;
rootTitle?: string;
options?: TreeItemOptions;
validationText?: string;
minCharacterLength?: number;
setItemsAsLinks?: boolean;
setFontSize?: number;
setIconSize?: number;
}
export interface FindingResults {
foundItem: TreeModel;
itemsList: TreeModel[];
parentItem?: TreeModel;
}