Added an basic implementation of bootstrap-treeview in typescript

This commit is contained in:
Jan Böhmer 2022-08-06 03:40:24 +02:00
parent e7fa1ebcb8
commit a8ff18a340
14 changed files with 4050 additions and 13 deletions

View file

@ -0,0 +1,44 @@
import BSTreeViewNodeState from "./BSTreeViewNodeState";
import BSTreeViewOptions from "./BSTreeViewOptions";
export default class BSTreeViewNode {
text: string;
icon: string;
image: string;
selectedIcon: string;
color: string;
backColor: string;
iconColor: string;
iconBackground: string;
selectable: boolean;
checkable: boolean;
state: BSTreeViewNodeState;
tags: string[];
dataAttr: object;
id: string;
class: string;
hideCheckbox: boolean;
nodes: BSTreeViewNode[];
tooltip: string;
lazyLoad: boolean;
tagsClass: string;
el: HTMLElement;
searchResult: boolean;
level: number;
index: number;
nodeId: string;
parentId: string
constructor(options: BSTreeViewNode|object = null) {
if(options) {
Object.assign(this, options);
}
}
}